svn commit: r345644 - head/tests/sys/netmap
Olivier Cochard
olivier at FreeBSD.org
Thu Mar 28 16:17:34 UTC 2019
Author: olivier (ports committer)
Date: Thu Mar 28 16:17:33 2019
New Revision: 345644
URL: https://svnweb.freebsd.org/changeset/base/345644
Log:
Skip this test if if_tap module is not available
PR: 236842
Approved by: asomers
MFC after: 1 month
Sponsored by: Netflix
Modified:
head/tests/sys/netmap/Makefile
head/tests/sys/netmap/ctrl-api-test.c
Modified: head/tests/sys/netmap/Makefile
==============================================================================
--- head/tests/sys/netmap/Makefile Thu Mar 28 14:21:22 2019 (r345643)
+++ head/tests/sys/netmap/Makefile Thu Mar 28 16:17:33 2019 (r345644)
@@ -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
Modified: head/tests/sys/netmap/ctrl-api-test.c
==============================================================================
--- head/tests/sys/netmap/ctrl-api-test.c Thu Mar 28 14:21:22 2019 (r345643)
+++ head/tests/sys/netmap/ctrl-api-test.c Thu Mar 28 16:17:33 2019 (r345644)
@@ -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)
{
@@ -1830,6 +1836,10 @@ main(int argc, char **argv)
int list = 0;
int opt;
int i;
+
+#ifdef __FreeBSD__
+ PLAIN_REQUIRE_KERNEL_MODULE("if_tap", 0);
+#endif
memset(&ctx_, 0, sizeof(ctx_));
More information about the svn-src-all
mailing list