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