Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Apr 2019 12:59:23 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r346740 - stable/12/tests/sys/netpfil/pf
Message-ID:  <201904261259.x3QCxN6c070148@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904261259.x3QCxN6c070148>