mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Skip if_epair regression test if module doesn't exist
Approved by: kp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D23876
This commit is contained in:
parent
1328771d9d
commit
8ccf503240
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358589
|
@ -22,6 +22,8 @@ TEST_METADATA+= is_exclusive=true
|
||||||
MAN=
|
MAN=
|
||||||
PROGS+= randsleep
|
PROGS+= randsleep
|
||||||
|
|
||||||
|
CFLAGS+= -I${.CURDIR:H:H}
|
||||||
|
|
||||||
WARNS?= 6
|
WARNS?= 6
|
||||||
|
|
||||||
.include <bsd.test.mk>
|
.include <bsd.test.mk>
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
#include <atf-c.h>
|
#include <atf-c.h>
|
||||||
|
#include "freebsd_test_suite/macros.h"
|
||||||
|
|
||||||
ATF_TC(params);
|
ATF_TC(params);
|
||||||
ATF_TC_HEAD(params, tc)
|
ATF_TC_HEAD(params, tc)
|
||||||
|
@ -52,9 +53,8 @@ ATF_TC_BODY(params, tc)
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
s = kldload("if_epair");
|
kldload("if_epair");
|
||||||
if (s == -1 && errno != EEXIST)
|
ATF_REQUIRE_KERNEL_MODULE("if_epair");
|
||||||
atf_tc_fail("Failed to load if_epair");
|
|
||||||
|
|
||||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (s < 0)
|
if (s < 0)
|
||||||
|
|
Loading…
Reference in a new issue