diff options
| author | Olivier Cochard <olivier@FreeBSD.org> | 2019-03-28 16:17:33 +0000 |
|---|---|---|
| committer | Olivier Cochard <olivier@FreeBSD.org> | 2019-03-28 16:17:33 +0000 |
| commit | 7d757b71bfe891ed892aedaaf0d39cef2c95422f (patch) | |
| tree | 59991eab133776595f42a83baff9fb641820a1b2 /tests/sys/netmap | |
| parent | 5ee94e995406fc1a7092869c54f717684db90f7a (diff) | |
Notes
Diffstat (limited to 'tests/sys/netmap')
| -rw-r--r-- | tests/sys/netmap/Makefile | 1 | ||||
| -rw-r--r-- | tests/sys/netmap/ctrl-api-test.c | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/sys/netmap/Makefile b/tests/sys/netmap/Makefile index 542a21c46930..381bc4aa5ffe 100644 --- a/tests/sys/netmap/Makefile +++ b/tests/sys/netmap/Makefile @@ -7,6 +7,7 @@ TEST_METADATA+= required_user="root" TEST_METADATA+= is_exclusive=true LDFLAGS+= -lpthread +CFLAGS+= -I${SRCTOP}/tests PLAIN_TESTS_C+= ctrl-api-test WARNS?= 6 diff --git a/tests/sys/netmap/ctrl-api-test.c b/tests/sys/netmap/ctrl-api-test.c index fac6595e0cc8..68f745b3d958 100644 --- a/tests/sys/netmap/ctrl-api-test.c +++ b/tests/sys/netmap/ctrl-api-test.c @@ -48,9 +48,15 @@ #include <unistd.h> #include <signal.h> +#ifdef __FreeBSD__ +#include "freebsd_test_suite/macros.h" +#endif + + #ifdef __linux__ #include <sys/eventfd.h> #else + static int eventfd(int x __unused, int y __unused) { @@ -1831,6 +1837,10 @@ main(int argc, char **argv) int opt; int i; +#ifdef __FreeBSD__ + PLAIN_REQUIRE_KERNEL_MODULE("if_tap", 0); +#endif + memset(&ctx_, 0, sizeof(ctx_)); { |
