Page MenuHomeFreeBSD

D35160.diff
No OneTemporary

D35160.diff

diff --git a/tests/sys/netpfil/pf/ether.sh b/tests/sys/netpfil/pf/ether.sh
--- a/tests/sys/netpfil/pf/ether.sh
+++ b/tests/sys/netpfil/pf/ether.sh
@@ -326,11 +326,7 @@
# Host is client, jail 'gw' is the captive portal gateway, jail 'srv'
# is a random (web)server. We use the echo protocol rather than http
# for the test, because that's easier.
- pft_init
-
- if ! kldstat -q -m dummynet; then
- atf_skip "This test requires dummynet"
- fi
+ dummynet_init
epair_gw=$(vnet_mkepair)
epair_srv=$(vnet_mkepair)
diff --git a/tests/sys/netpfil/pf/match.sh b/tests/sys/netpfil/pf/match.sh
--- a/tests/sys/netpfil/pf/match.sh
+++ b/tests/sys/netpfil/pf/match.sh
@@ -36,10 +36,7 @@
dummynet_body()
{
- pft_init
- if ! kldstat -q -m dummynet; then
- atf_skip "This test requires dummynet"
- fi
+ dummynet_init
epair=$(vnet_mkepair)
vnet_mkjail alcatraz ${epair}b
diff --git a/tests/sys/netpfil/pf/utils.subr b/tests/sys/netpfil/pf/utils.subr
--- a/tests/sys/netpfil/pf/utils.subr
+++ b/tests/sys/netpfil/pf/utils.subr
@@ -87,6 +87,15 @@
fi
}
+dummynet_init()
+{
+ pft_init
+
+ if ! kldstat -q -m dummynet; then
+ atf_skip "This test requires dummynet"
+ fi
+}
+
pft_set_rules()
{
jname=$1

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 21, 8:33 PM (19 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16020221
Default Alt Text
D35160.diff (1 KB)

Event Timeline