svn commit: r346347 - head/tests/sys/netpfil/pf
Kristof Provost
kp at FreeBSD.org
Tue Sep 3 14:07:57 UTC 2019
Author: kp
Date: Thu Apr 18 10:54:08 2019
New Revision: 346347
URL: https://svnweb.freebsd.org/changeset/base/346347
Log:
pf tests: Fail the test if we can't set the rules
The test should fail if pf rules can't be set. This is helpful both
while writing tests and to verify that pfctl works as expected.
MFC after: 1 week
Event: Aberdeen hackathon 2019
Modified:
head/tests/sys/netpfil/pf/utils.subr
Modified: head/tests/sys/netpfil/pf/utils.subr
==============================================================================
--- head/tests/sys/netpfil/pf/utils.subr Thu Apr 18 05:40:50 2019 (r346346)
+++ head/tests/sys/netpfil/pf/utils.subr Thu Apr 18 10:54:08 2019 (r346347)
@@ -40,6 +40,10 @@ pft_set_rules()
printf "$1\n"
shift
done | jexec ${jname} pfctl -f -
+ if [ $? -ne 0 ];
+ then
+ atf_fail "Failed to set PF rules in ${jname}"
+ fi
}
pft_cleanup()
More information about the svn-src-all
mailing list