diff options
author | ngie <ngie@FreeBSD.org> | 2015-04-28 10:56:59 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-04-28 10:56:59 +0000 |
commit | 7c41d36452b84a6e92e0d5a1139a048ddc58ed5e (patch) | |
tree | d19e5a1b4c36b18d507a5bba121d6db9006585be /tests | |
parent | 934db4e3400cb8369b8aae0e0822f462be873672 (diff) | |
download | FreeBSD-src-7c41d36452b84a6e92e0d5a1139a048ddc58ed5e.zip FreeBSD-src-7c41d36452b84a6e92e0d5a1139a048ddc58ed5e.tar.gz |
Use PLAIN_REQUIRE_KERNEL_MODULE to require "mqueuefs"
MFC after: 6 days
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sys/mqueue/Makefile | 2 | ||||
-rw-r--r-- | tests/sys/mqueue/mqtest1.c | 4 | ||||
-rw-r--r-- | tests/sys/mqueue/mqtest2.c | 4 | ||||
-rw-r--r-- | tests/sys/mqueue/mqtest3.c | 4 | ||||
-rw-r--r-- | tests/sys/mqueue/mqtest4.c | 4 | ||||
-rw-r--r-- | tests/sys/mqueue/mqtest5.c | 4 |
6 files changed, 22 insertions, 0 deletions
diff --git a/tests/sys/mqueue/Makefile b/tests/sys/mqueue/Makefile index 230fcb7..5af8b25 100644 --- a/tests/sys/mqueue/Makefile +++ b/tests/sys/mqueue/Makefile @@ -6,6 +6,8 @@ ATF_TESTS_SH= mqueue_test BINDIR= ${TESTSDIR} +CFLAGS+= -I${.CURDIR:H:H} + PROGS+= mqtest1 PROGS+= mqtest2 PROGS+= mqtest3 diff --git a/tests/sys/mqueue/mqtest1.c b/tests/sys/mqueue/mqtest1.c index 5590b87..3accb28 100644 --- a/tests/sys/mqueue/mqtest1.c +++ b/tests/sys/mqueue/mqtest1.c @@ -7,6 +7,8 @@ #include <signal.h> #include <stdio.h> +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue1" int @@ -17,6 +19,8 @@ main(void) mqd_t mq; int status; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + attr.mq_maxmsg = 2; attr.mq_msgsize = 100; mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr); diff --git a/tests/sys/mqueue/mqtest2.c b/tests/sys/mqueue/mqtest2.c index aaef43b..067e619 100644 --- a/tests/sys/mqueue/mqtest2.c +++ b/tests/sys/mqueue/mqtest2.c @@ -10,6 +10,8 @@ #include <stdlib.h> #include <unistd.h> +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue2" #define LOOPS 1000 #define PRIO 10 @@ -29,6 +31,8 @@ main(void) int status; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; diff --git a/tests/sys/mqueue/mqtest3.c b/tests/sys/mqueue/mqtest3.c index 4ee812c..c4b849e 100644 --- a/tests/sys/mqueue/mqtest3.c +++ b/tests/sys/mqueue/mqtest3.c @@ -11,6 +11,8 @@ #include <stdlib.h> #include <unistd.h> +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue3" #define LOOPS 1000 #define PRIO 10 @@ -31,6 +33,8 @@ main(void) mqd_t mq; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; diff --git a/tests/sys/mqueue/mqtest4.c b/tests/sys/mqueue/mqtest4.c index d249cf6..474d212 100644 --- a/tests/sys/mqueue/mqtest4.c +++ b/tests/sys/mqueue/mqtest4.c @@ -12,6 +12,8 @@ #include <stdlib.h> #include <unistd.h> +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue4" #define LOOPS 1000 #define PRIO 10 @@ -32,6 +34,8 @@ main(void) int kq, status; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; diff --git a/tests/sys/mqueue/mqtest5.c b/tests/sys/mqueue/mqtest5.c index 7f4d554..0c8aa89 100644 --- a/tests/sys/mqueue/mqtest5.c +++ b/tests/sys/mqueue/mqtest5.c @@ -12,6 +12,8 @@ #include <stdlib.h> #include <unistd.h> +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue5" #define LOOPS 1000 #define PRIO 10 @@ -34,6 +36,8 @@ main(void) mqd_t mq; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); sigemptyset(&set); |