Date: Thu, 28 Mar 2019 16:17:33 +0000 (UTC) From: Olivier Cochard <olivier@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345644 - head/tests/sys/netmap Message-ID: <201903281617.x2SGHXCO039647@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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_));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903281617.x2SGHXCO039647>