Skip to content

Commit

Permalink
Use PLAIN_REQUIRE_KERNEL_MODULE to require "mqueuefs"
Browse files Browse the repository at this point in the history
MFC after: 6 days
  • Loading branch information
ngie-eign committed Apr 28, 2015
1 parent 4e5f38d commit e8395c4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/sys/mqueue/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ATF_TESTS_SH= mqueue_test

BINDIR= ${TESTSDIR}

CFLAGS+= -I${.CURDIR:H:H}

PROGS+= mqtest1
PROGS+= mqtest2
PROGS+= mqtest3
Expand Down
4 changes: 4 additions & 0 deletions tests/sys/mqueue/mqtest1.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <signal.h>
#include <stdio.h>

#include "freebsd_test_suite/macros.h"

#define MQNAME "/mytstqueue1"

int
Expand All @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions tests/sys/mqueue/mqtest2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,6 +31,8 @@ main(void)
int status;
pid_t pid;

PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0);

mq_unlink(MQNAME);

attr.mq_maxmsg = 5;
Expand Down
4 changes: 4 additions & 0 deletions tests/sys/mqueue/mqtest3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions tests/sys/mqueue/mqtest4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions tests/sys/mqueue/mqtest5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,6 +36,8 @@ main(void)
mqd_t mq;
pid_t pid;

PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0);

mq_unlink(MQNAME);

sigemptyset(&set);
Expand Down

0 comments on commit e8395c4

Please sign in to comment.