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