Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jul 2018 03:58:02 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336595 - head/sbin/pfctl/tests
Message-ID:  <201807220358.w6M3w21v054462@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Sun Jul 22 03:58:01 2018
New Revision: 336595
URL: https://svnweb.freebsd.org/changeset/base/336595

Log:
  Skip the pftcl(8) tests if pf isn't loaded.
  
  Previously, they would simply fail.
  
  MFC after:	2 weeks

Modified:
  head/sbin/pfctl/tests/pfctl_test.sh

Modified: head/sbin/pfctl/tests/pfctl_test.sh
==============================================================================
--- head/sbin/pfctl/tests/pfctl_test.sh	Sat Jul 21 23:54:40 2018	(r336594)
+++ head/sbin/pfctl/tests/pfctl_test.sh	Sun Jul 22 03:58:01 2018	(r336595)
@@ -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 ; }"



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