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