xref: /freebsd/tests/sys/kern/Makefile (revision 41059135ce931c0f1014a999ffabc6bc470ce856)
1# $FreeBSD$
2
3TESTSRC=	${SRCTOP}/contrib/netbsd-tests/kernel
4.PATH:		${SRCTOP}/sys/kern
5
6TESTSDIR=	${TESTSBASE}/sys/kern
7
8ATF_TESTS_C+=	kern_copyin
9ATF_TESTS_C+=	kern_descrip_test
10ATF_TESTS_C+=	ptrace_test
11TEST_METADATA.ptrace_test+=		timeout="15"
12ATF_TESTS_C+=	reaper
13PLAIN_TESTS_C+=	subr_unit_test
14ATF_TESTS_C+=	unix_seqpacket_test
15ATF_TESTS_C+=	unix_passfd_test
16TEST_METADATA.unix_seqpacket_test+=	timeout="15"
17ATF_TESTS_C+=	waitpid_nohang
18
19ATF_TESTS_SH+=	coredump_phnum_test
20
21BINDIR=		${TESTSDIR}
22PROGS+=		coredump_phnum_helper
23
24LIBADD.ptrace_test+=			pthread
25LIBADD.unix_seqpacket_test+=		pthread
26
27NETBSD_ATF_TESTS_C+=	lockf_test
28NETBSD_ATF_TESTS_C+=	mqueue_test
29
30CFLAGS.mqueue_test+=	-I${SRCTOP}/tests
31LIBADD.mqueue_test+=	rt
32
33.if ${MACHINE_ARCH} == "amd64" || \
34    ${MACHINE_ARCH} == "i386" || \
35    ${MACHINE_ARCH} == "aarch64"
36ATF_TESTS_C+=	libkern_crc32
37CFLAGS.libkern_crc32+=	-DUSERSPACE_TESTING
38.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
39LDADD.libkern_crc32+=	${SRCTOP}/sys/libkern/x86/crc32_sse42.c
40.else
41LDADD.libkern_crc32+=	${SRCTOP}/sys/libkern/arm64/crc32c_armv8.S
42.endif
43.endif
44
45# subr_unit.c contains functions whose prototypes lie in headers that cannot be
46# included in userland.  But as far as subr_unit_test goes, they're effectively
47# static.  So it's ok to disable -Wmissing-prototypes for this program.
48CFLAGS.subr_unit.c+=	-Wno-missing-prototypes
49SRCS.subr_unit_test+=	subr_unit.c
50
51WARNS?=	3
52
53TESTS_SUBDIRS+=	acct
54TESTS_SUBDIRS+=	execve
55TESTS_SUBDIRS+=	pipe
56
57.include <netbsd-tests.test.mk>
58
59.include <bsd.test.mk>
60