1# $FreeBSD$ 2 3PACKAGE= tests 4 5TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel 6.PATH: ${SRCTOP}/sys/kern 7 8TESTSDIR= ${TESTSBASE}/sys/kern 9 10#ATF_TESTS_C+= kcov 11ATF_TESTS_C+= kern_copyin 12ATF_TESTS_C+= kern_descrip_test 13ATF_TESTS_C+= kill_zombie 14ATF_TESTS_C+= ptrace_test 15TEST_METADATA.ptrace_test+= timeout="15" 16ATF_TESTS_C+= reaper 17ATF_TESTS_C+= sigaltstack 18PLAIN_TESTS_C+= subr_unit_test 19ATF_TESTS_C+= sys_getrandom 20ATF_TESTS_C+= unix_passfd_test 21ATF_TESTS_C+= unix_seqpacket_test 22TEST_METADATA.unix_seqpacket_test+= timeout="15" 23ATF_TESTS_C+= unix_socketpair_test 24ATF_TESTS_C+= waitpid_nohang 25ATF_TESTS_C+= pdeathsig 26 27ATF_TESTS_SH+= coredump_phnum_test 28ATF_TESTS_SH+= sonewconn_overflow 29TEST_METADATA.sonewconn_overflow+= required_programs="python" 30TEST_METADATA.sonewconn_overflow+= required_user="root" 31ATF_TESTS_SH+= sendfile_test 32 33${PACKAGE}FILES+= sonewconn_overflow.py 34${PACKAGE}FILESMODE_sonewconn_overflow.py=0555 35 36BINDIR= ${TESTSDIR} 37PROGS+= coredump_phnum_helper 38PROGS+= pdeathsig_helper 39PROGS+= sendfile_helper 40 41CFLAGS.sys_getrandom+= -I${SRCTOP}/sys/contrib/zstd/lib 42LIBADD.sys_getrandom+= zstd 43LIBADD.sys_getrandom+= c 44LIBADD.sys_getrandom+= pthread 45LIBADD.ptrace_test+= pthread 46LIBADD.unix_seqpacket_test+= pthread 47LIBADD.kcov+= pthread 48LIBADD.sendfile_helper+= pthread 49 50NETBSD_ATF_TESTS_C+= lockf_test 51NETBSD_ATF_TESTS_C+= mqueue_test 52NETBSD_ATF_TESTS_C+= sysv_test 53 54CFLAGS.mqueue_test+= -I${SRCTOP}/tests 55LIBADD.mqueue_test+= rt 56 57.if ${MACHINE_ARCH} == "amd64" || \ 58 ${MACHINE_ARCH} == "i386" || \ 59 ${MACHINE_CPUARCH} == "aarch64" 60ATF_TESTS_C+= libkern_crc32 61.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" 62LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/x86/crc32_sse42.c 63.else 64LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/arm64/crc32c_armv8.S 65.endif 66.endif 67 68# subr_unit.c contains functions whose prototypes lie in headers that cannot be 69# included in userland. But as far as subr_unit_test goes, they're effectively 70# static. So it's ok to disable -Wmissing-prototypes for this program. 71CFLAGS.subr_unit.c+= -Wno-missing-prototypes 72SRCS.subr_unit_test+= subr_unit.c 73 74WARNS?= 3 75 76TESTS_SUBDIRS+= acct 77TESTS_SUBDIRS+= execve 78TESTS_SUBDIRS+= pipe 79 80.include <netbsd-tests.test.mk> 81 82.include <bsd.test.mk> 83