1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5TESTSDIR= ${TESTSBASE}/sys/capsicum 6 7ATF_TESTS_C+= bindat_connectat 8ATF_TESTS_C+= ioctls_test 9 10CFLAGS+= -I${SRCTOP}/tests 11 12.if ${MK_GOOGLETEST} != no 13 14.PATH: ${SRCTOP}/contrib/capsicum-test 15 16GTESTS+= capsicum-test 17GTESTS_WRAPPER_SH.capsicum-test= functional 18 19SRCS.capsicum-test+= \ 20 capsicum-test-main.cc \ 21 capsicum-test.cc \ 22 capability-fd.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