Author: kp
Date: Fri Apr 26 12:59:23 2019
New Revision: 346740
URL: https://svnweb.freebsd.org/changeset/base/346740

Log:
  MFC r346347:
  
  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.

Modified:
  stable/12/tests/sys/netpfil/pf/utils.subr
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/tests/sys/netpfil/pf/utils.subr
==============================================================================
--- stable/12/tests/sys/netpfil/pf/utils.subr   Fri Apr 26 12:55:52 2019        
(r346739)
+++ stable/12/tests/sys/netpfil/pf/utils.subr   Fri Apr 26 12:59:23 2019        
(r346740)
@@ -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()
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to