Skip this test if if_tap module is not available

PR:		236842
Approved by:	asomers
MFC after:	1 month
Sponsored by:	Netflix
This commit is contained in:
Olivier Cochard 2019-03-28 16:17:33 +00:00
parent 5ee94e9954
commit 7d757b71bf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345644
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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_));
{