summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOlivier Cochard <olivier@FreeBSD.org>2020-03-03 17:35:15 +0000
committerOlivier Cochard <olivier@FreeBSD.org>2020-03-03 17:35:15 +0000
commit8ccf50324056f9a5cb1f0da6886380775ae4f51a (patch)
tree1136221d5c2b986b0000d9f70ec173b2dbc90577 /tests
parent1328771d9d5541174b6944dbe6bf835eb5e8cf19 (diff)
downloadsrc-test2-8ccf50324056f9a5cb1f0da6886380775ae4f51a.tar.gz
src-test2-8ccf50324056f9a5cb1f0da6886380775ae4f51a.zip
Notes
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/net/Makefile2
-rw-r--r--tests/sys/net/if_epair.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/sys/net/Makefile b/tests/sys/net/Makefile
index 7bf51a5e9ecf..ce9a06319071 100644
--- a/tests/sys/net/Makefile
+++ b/tests/sys/net/Makefile
@@ -22,6 +22,8 @@ TEST_METADATA+= is_exclusive=true
MAN=
PROGS+= randsleep
+CFLAGS+= -I${.CURDIR:H:H}
+
WARNS?= 6
.include <bsd.test.mk>
diff --git a/tests/sys/net/if_epair.c b/tests/sys/net/if_epair.c
index 87b61be09ebf..e6864d3ebf93 100644
--- a/tests/sys/net/if_epair.c
+++ b/tests/sys/net/if_epair.c
@@ -40,6 +40,7 @@
#include <strings.h>
#include <atf-c.h>
+#include "freebsd_test_suite/macros.h"
ATF_TC(params);
ATF_TC_HEAD(params, tc)
@@ -52,9 +53,8 @@ ATF_TC_BODY(params, tc)
struct ifreq ifr;
int s;
- s = kldload("if_epair");
- if (s == -1 && errno != EEXIST)
- atf_tc_fail("Failed to load if_epair");
+ kldload("if_epair");
+ ATF_REQUIRE_KERNEL_MODULE("if_epair");
s = socket(AF_INET, SOCK_DGRAM, 0);
if (s < 0)