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