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