diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 1ec53d5d0028..e64f24c52a76 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -358,6 +358,8 @@ execve .. .. + kqueue + .. netinet .. opencrypto diff --git a/tests/sys/Makefile b/tests/sys/Makefile index 9225eabcdb90..5afa3be9792e 100644 --- a/tests/sys/Makefile +++ b/tests/sys/Makefile @@ -5,6 +5,7 @@ TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= kern +TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= opencrypto diff --git a/tools/regression/kqueue/Makefile b/tests/sys/kqueue/Makefile similarity index 62% rename from tools/regression/kqueue/Makefile rename to tests/sys/kqueue/Makefile index 12b7527525b3..43277ca0c86b 100644 --- a/tools/regression/kqueue/Makefile +++ b/tests/sys/kqueue/Makefile @@ -6,8 +6,14 @@ # libkqueue and test suite by Mark Heily # -PROG=kqtest -SRCS= \ +TAP_TESTS_SH= kqueue_test + +TESTSDIR= ${TESTSBASE}/sys/kqueue +BINDIR= ${TESTSDIR} + +PROGS= kqtest + +SRCS.kqtest= \ main.c \ read.c \ timer.c \ @@ -15,7 +21,6 @@ SRCS= \ proc.c \ signal.c \ user.c -MAN= WARNS?= 2 -.include "bsd.prog.mk" +.include diff --git a/tools/regression/kqueue/common.h b/tests/sys/kqueue/common.h similarity index 100% rename from tools/regression/kqueue/common.h rename to tests/sys/kqueue/common.h diff --git a/tools/regression/kqueue/config.h b/tests/sys/kqueue/config.h similarity index 100% rename from tools/regression/kqueue/config.h rename to tests/sys/kqueue/config.h diff --git a/tests/sys/kqueue/kqueue_test.sh b/tests/sys/kqueue/kqueue_test.sh new file mode 100755 index 000000000000..62a7e2305702 --- /dev/null +++ b/tests/sys/kqueue/kqueue_test.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +cd $(dirname $0) +i=1 +./kqtest | while read line; do + echo $line | grep -q passed + if [ $? -eq 0 ]; then + echo "ok - $i $line" + : $(( i += 1 )) + fi + + echo $line | grep -q 'tests completed' + if [ $? -eq 0 ]; then + echo -n "1.." + echo $line | cut -d' ' -f3 + fi +done diff --git a/tools/regression/kqueue/main.c b/tests/sys/kqueue/main.c similarity index 100% rename from tools/regression/kqueue/main.c rename to tests/sys/kqueue/main.c diff --git a/tools/regression/kqueue/proc.c b/tests/sys/kqueue/proc.c similarity index 100% rename from tools/regression/kqueue/proc.c rename to tests/sys/kqueue/proc.c diff --git a/tools/regression/kqueue/read.c b/tests/sys/kqueue/read.c similarity index 100% rename from tools/regression/kqueue/read.c rename to tests/sys/kqueue/read.c diff --git a/tools/regression/kqueue/signal.c b/tests/sys/kqueue/signal.c similarity index 100% rename from tools/regression/kqueue/signal.c rename to tests/sys/kqueue/signal.c diff --git a/tools/regression/kqueue/timer.c b/tests/sys/kqueue/timer.c similarity index 100% rename from tools/regression/kqueue/timer.c rename to tests/sys/kqueue/timer.c diff --git a/tools/regression/kqueue/user.c b/tests/sys/kqueue/user.c similarity index 100% rename from tools/regression/kqueue/user.c rename to tests/sys/kqueue/user.c diff --git a/tools/regression/kqueue/vnode.c b/tests/sys/kqueue/vnode.c similarity index 100% rename from tools/regression/kqueue/vnode.c rename to tests/sys/kqueue/vnode.c