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