Date: Tue, 03 Sep 2019 14:07:57 -0000 From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346347 - head/tests/sys/netpfil/pf Message-ID: <201904181054.x3IAs9kF050890@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904181054.x3IAs9kF050890>