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