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