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 12ATF_TESTS_C+= basic_signal 13.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "powerpc" && \ 14 ${MACHINE_ARCH} != "powerpcspe" 15# No support for atomic_load_64 on i386 or (32-bit) powerpc 16ATF_TESTS_C+= kcov 17.endif 18ATF_TESTS_C+= kern_copyin 19ATF_TESTS_C+= kern_descrip_test 20ATF_TESTS_C+= fdgrowtable_test 21ATF_TESTS_C+= kill_zombie 22.if ${MK_OPENSSL} != "no" 23ATF_TESTS_C+= ktls_test 24.endif 25ATF_TESTS_C+= module_test 26ATF_TESTS_C+= ptrace_test 27TEST_METADATA.ptrace_test+= timeout="15" 28ATF_TESTS_C+= reaper 29ATF_TESTS_C+= sched_affinity 30ATF_TESTS_C+= sigaltstack 31ATF_TESTS_C+= sigwait 32ATF_TESTS_C+= socket_accf 33ATF_TESTS_C+= socket_msg_trunc 34TEST_METADATA.sigwait+= is_exclusive="true" 35.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH:Mpowerpc*} == "" 36ATF_TESTS_C+= subr_physmem_test 37.endif 38PLAIN_TESTS_C+= subr_unit_test 39ATF_TESTS_C+= sysctl_kern_proc 40ATF_TESTS_C+= sys_getrandom 41ATF_TESTS_C+= unix_dgram 42ATF_TESTS_C+= unix_passfd_dgram 43TEST_METADATA.unix_passfd_dgram+= is_exclusive="true" 44ATF_TESTS_C+= unix_passfd_stream 45TEST_METADATA.unix_passfd_stream+= is_exclusive="true" 46ATF_TESTS_C+= unix_seqpacket_test 47TEST_METADATA.unix_seqpacket_test+= timeout="15" 48ATF_TESTS_C+= unix_socketpair_test 49ATF_TESTS_C+= waitpid_nohang 50ATF_TESTS_C+= pdeathsig 51 52ATF_TESTS_SH+= coredump_phnum_test 53ATF_TESTS_SH+= sonewconn_overflow 54TEST_METADATA.sonewconn_overflow+= required_programs="python" 55TEST_METADATA.sonewconn_overflow+= required_user="root" 56ATF_TESTS_SH+= sendfile_test 57 58${PACKAGE}FILES+= sonewconn_overflow.py 59${PACKAGE}FILESMODE_sonewconn_overflow.py=0555 60 61BINDIR= ${TESTSDIR} 62PROGS+= coredump_phnum_helper 63PROGS+= pdeathsig_helper 64PROGS+= sendfile_helper 65 66CFLAGS.sys_getrandom+= -I${SRCTOP}/sys/contrib/zstd/lib 67LIBADD.sys_getrandom+= zstd 68LIBADD.sys_getrandom+= c 69LIBADD.sys_getrandom+= pthread 70LIBADD.ptrace_test+= pthread 71LIBADD.unix_seqpacket_test+= pthread 72LIBADD.kcov+= pthread 73CFLAGS.ktls_test+= -DOPENSSL_API_COMPAT=0x10100000L 74LIBADD.ktls_test+= crypto util 75LIBADD.sendfile_helper+= pthread 76LIBADD.fdgrowtable_test+= util pthread kvm procstat 77LIBADD.sigwait+= rt 78 79NETBSD_ATF_TESTS_C+= lockf_test 80NETBSD_ATF_TESTS_C+= mqueue_test 81NETBSD_ATF_TESTS_C+= sysv_test 82 83CFLAGS.mqueue_test+= -I${SRCTOP}/tests 84LIBADD.mqueue_test+= rt 85 86ATF_TESTS_C+= libkern_crc32 87SRCS.libkern_crc32+= libkern_crc32.c 88.PATH: ${SRCTOP}/sys/libkern 89SRCS.libkern_crc32+= gsb_crc32.c 90CFLAGS.libkern_crc32+= -DTESTING 91.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" 92.PATH: ${SRCTOP}/sys/libkern/x86 93SRCS.libkern_crc32+= crc32_sse42.c 94.elif ${MACHINE_CPUARCH} == "aarch64" 95.PATH: ${SRCTOP}/sys/libkern/arm64 96SRCS.libkern_crc32+= crc32c_armv8.S 97.endif 98 99CFLAGS.subr_physmem.c+= -D_WANT_FREEBSD_BITSET 100SRCS.subr_physmem_test+= subr_physmem_test.c subr_physmem.c 101 102# subr_unit.c contains functions whose prototypes lie in headers that cannot be 103# included in userland. But as far as subr_unit_test goes, they're effectively 104# static. So it's ok to disable -Wmissing-prototypes for this program. 105CFLAGS.subr_unit.c+= -Wno-missing-prototypes 106SRCS.subr_unit_test+= subr_unit.c 107 108WARNS?= 3 109 110TESTS_SUBDIRS+= acct 111TESTS_SUBDIRS+= execve 112TESTS_SUBDIRS+= pipe 113 114.include <netbsd-tests.test.mk> 115 116.include <bsd.test.mk> 117