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