1 2.include <src.opts.mk> 3 4TESTSDIR= ${TESTSBASE}/sys/capsicum 5 6ATF_TESTS_C+= bindat_connectat 7ATF_TESTS_C+= ioctls_test 8 9CFLAGS+= -I${SRCTOP}/tests 10 11.if ${MK_GOOGLETEST} != no 12 13.PATH: ${SRCTOP}/contrib/capsicum-test 14 15GTESTS+= capsicum-test 16GTESTS_WRAPPER_SH.capsicum-test= functional 17 18SRCS.capsicum-test+= \ 19 capsicum-test-main.cc \ 20 capsicum-test.cc \ 21 capability-fd.cc \ 22 copy_file_range.cc \ 23 fexecve.cc \ 24 procdesc.cc \ 25 capmode.cc \ 26 fcntl.cc \ 27 ioctl.cc \ 28 openat.cc \ 29 sysctl.cc \ 30 select.cc \ 31 mqueue.cc \ 32 socket.cc \ 33 sctp.cc \ 34 capability-fd-pair.cc \ 35 overhead.cc \ 36 rename.cc 37 38LIBADD.capsicum-test+= gtest pthread procstat 39TEST_METADATA.capsicum-test= required_user="unprivileged" 40 41.for p in mini-me mini-me.noexec mini-me.setuid 42PROGS+= $p 43NO_SHARED.$p= 44SRCS.$p= mini-me.c 45.endfor 46.if ${MK_ASAN} != "no" || ${MK_UBSAN} != "no" 47# mini-me.o is linked into a static binary so we can't use sanitizers. 48# Note: We have to set CFLAGS here since it will be built as part of 49# _PROGS_COMMON_OBJS and therefore NO_SHARED.$p does not disable ASAN/UBSAN. 50CFLAGS.mini-me.c+= -fno-sanitize=address -fno-sanitize=undefined 51.endif 52 53BINDIR= ${TESTSDIR} 54 55BINMODE.mini-me.noexec= ${NOBINMODE} 56BINMODE.mini-me.setuid= 4555 57 58WARNS.capsicum-test= 3 59 60.endif # MK_GOOGLETEST 61 62.include <bsd.test.mk> 63