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
This commit is contained in:
parent
a13881aff4
commit
b20ff7b90a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346347
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user