summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2016-04-29 21:11:31 +0000
committerasomers <asomers@FreeBSD.org>2016-04-29 21:11:31 +0000
commiteffae8a6ec7270e09599f54cff195ceaef0df923 (patch)
tree855a29bf47c006914832b3e1042624b8a196906d /tests
parent8932da33aa2ff2b792193de01f9f9dd3ff6f9854 (diff)
downloadFreeBSD-src-effae8a6ec7270e09599f54cff195ceaef0df923.zip
FreeBSD-src-effae8a6ec7270e09599f54cff195ceaef0df923.tar.gz
Automate the subr_unit test.
Build and install the subr_unit test program originally written by phk, and run it with the other ATF tests. tests/sys/kern/Makefile * Build and install the subr_unit test as a plain test sys/kern/subr_unit.c * Reduce the default number of repetitions from 100 to 1, and add a command-line parser to override it. * Don't be so noisy by default * Fix an include problem for the test build Reviewed by: ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6038
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/kern/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile
index f38cc58..4a24a40 100644
--- a/tests/sys/kern/Makefile
+++ b/tests/sys/kern/Makefile
@@ -4,12 +4,14 @@ PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel
+.PATH: ${SRCTOP}/sys/kern
TESTSDIR= ${TESTSBASE}/sys/kern
ATF_TESTS_C+= kern_copyin
ATF_TESTS_C+= kern_descrip_test
ATF_TESTS_C+= ptrace_test
+PLAIN_TESTS_C+= subr_unit_test
ATF_TESTS_C+= unix_seqpacket_test
ATF_TESTS_C+= unix_passfd_test
TEST_METADATA.unix_seqpacket_test+= timeout="15"
@@ -23,6 +25,14 @@ NETBSD_ATF_TESTS_C+= mqueue_test
CFLAGS.mqueue_test+= -I${SRCTOP}/tests
LIBADD.mqueue_test+= rt
+# subr_unit.c contains functions whose prototypes lie in headers that cannot be
+# included in userland. But as far as subr_unit_test goes, they're effectively
+# static. So it's ok to disable -Wmissing-prototypes for this program.
+CFLAGS.subr_unit.c+= -Wno-missing-prototypes
+# XXX: -Wno-sign-compare will be eliminated as part of D6004
+CFLAGS.subr_unit.c+= -Wno-sign-compare
+SRCS.subr_unit_test+= subr_unit.c
+
WARNS?= 5
TESTS_SUBDIRS+= acct
OpenPOWER on IntegriCloud