xref: /freebsd/tests/sys/audit/Makefile (revision 7a7741af18d6c8a804cc643cb7ecda9d730c6aa6)
1TESTSDIR=	${TESTSBASE}/sys/audit
2
3ATF_TESTS_C=	file-attribute-access
4ATF_TESTS_C+=	file-attribute-modify
5ATF_TESTS_C+=	file-create
6ATF_TESTS_C+=	file-delete
7ATF_TESTS_C+=	file-close
8ATF_TESTS_C+=	file-write
9ATF_TESTS_C+=	file-read
10ATF_TESTS_C+=	open
11ATF_TESTS_C+=	ioctl
12ATF_TESTS_C+=	network
13ATF_TESTS_C+=	inter-process
14ATF_TESTS_C+=	administrative
15ATF_TESTS_C+=	process-control
16ATF_TESTS_C+=	miscellaneous
17
18SRCS.file-attribute-access+=	file-attribute-access.c
19SRCS.file-attribute-access+=	utils.c
20SRCS.file-attribute-modify+=	file-attribute-modify.c
21SRCS.file-attribute-modify+=	utils.c
22SRCS.file-create+=	file-create.c
23SRCS.file-create+=	utils.c
24SRCS.file-delete+=	file-delete.c
25SRCS.file-delete+=	utils.c
26SRCS.file-close+=	file-close.c
27SRCS.file-close+=	utils.c
28SRCS.file-write+=	file-write.c
29SRCS.file-write+=	utils.c
30SRCS.file-read+=	file-read.c
31SRCS.file-read+=	utils.c
32SRCS.open+=		open.c
33SRCS.open+=		utils.c
34SRCS.ioctl+=		ioctl.c
35SRCS.ioctl+=		utils.c
36SRCS.network+=		network.c
37SRCS.network+=		utils.c
38SRCS.inter-process+=		inter-process.c
39SRCS.inter-process+=		utils.c
40SRCS.administrative+=		administrative.c
41SRCS.administrative+=		utils.c
42SRCS.process-control+=		process-control.c
43SRCS.process-control+=		utils.c
44SRCS.miscellaneous+=		miscellaneous.c
45SRCS.miscellaneous+=		utils.c
46
47TEST_METADATA+= timeout="30"
48TEST_METADATA+= required_user="root"
49# Only one process can be auditing, if we attempt to run these tests in parallel
50# some of them will fail to start auditing.
51# TODO: it would be nice to be able to run them in parallel with other non-audit
52# tests using some internal form of synchronization.
53# TODO: In addititon to test failures, running in parallel can trigger a kernel
54# panic: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253616
55TEST_METADATA+= is_exclusive="true"
56TEST_METADATA+=	required_files="/etc/rc.d/auditd /dev/auditpipe"
57
58MK_PIE:=	no	# XXX libprivateauditd.a is not PIE
59LDFLAGS+=	-lbsm -lutil
60OPENBSMDIR=${SRCTOP}/contrib/openbsm
61CFLAGS+=	-I${OPENBSMDIR}
62LDADD+=	${LIBAUDITD}
63
64CFLAGS.process-control.c+=	-I${SRCTOP}/tests
65
66.include <bsd.test.mk>
67