diff options
author | Kristof Provost <kp@FreeBSD.org> | 2023-02-28 10:14:24 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2023-03-01 09:07:34 +0000 |
commit | 69361b8785468fe15bb2b169a0b72af5bc108cfa (patch) | |
tree | d549245da3fd2fc8e3c135de83b0f2127f78b3e1 /tests | |
parent | 8dff0b6761407357c5bb42ee799c5c9f465557a3 (diff) | |
download | src-69361b8785468fe15bb2b169a0b72af5bc108cfa.tar.gz src-69361b8785468fe15bb2b169a0b72af5bc108cfa.zip |
if_ovpn tests: skip the if_ovpn_c test if if_ovpn.ko isn't loaded
Skip the test (rather than loading it) if if_ovpn.ko isn't loaded. Match
the behaviour of other tests.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sys/net/if_ovpn/if_ovpn_c.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/sys/net/if_ovpn/if_ovpn_c.c b/tests/sys/net/if_ovpn/if_ovpn_c.c index d98f5a0dd8e6..fa8a9a07fa35 100644 --- a/tests/sys/net/if_ovpn/if_ovpn_c.c +++ b/tests/sys/net/if_ovpn/if_ovpn_c.c @@ -88,7 +88,8 @@ ATF_TC_BODY(tcp, tc) nvlist_t *nvl; /* Ensure the module is loaded. */ - (void)kldload("if_ovpn"); + if (kldfind("if_ovpn") == -1 && errno == ENOENT) + atf_tc_skip("if_ovpn not loaded"); ovpn_fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); |