Skip the pftcl(8) tests if pf isn't loaded.

Previously, they would simply fail.

MFC after:	2 weeks
This commit is contained in:
asomers 2018-07-22 03:58:01 +00:00
parent f2573d2e4d
commit db69ec6635

View File

@ -30,6 +30,7 @@ for i in ${pftests} ; do
atf_test_case "pf${i}"
eval "pf${i}_head () { atf_set descr \"$(pf${i}_descr)\" ; }"
eval "pf${i}_body () { \
kldstat -m pf || atf_skip \"pf(4) is not loaded\" && \
cd $(atf_get_srcdir)/files && \
atf_check -o file:pf${i}.ok \
pfctl -o none -nvf - < pf${i}.in ; }"