svn commit: r337646 - head/tests/sys/netpfil/pf
Kristof Provost
kp at FreeBSD.org
Sat Aug 11 16:41:08 UTC 2018
Author: kp
Date: Sat Aug 11 16:41:07 2018
New Revision: 337646
URL: https://svnweb.freebsd.org/changeset/base/337646
Log:
pf tests: Basic test for 'set skip in $groupname'
This tests for the problem reported in PR 229241, where using a group
name in 'set skip on' did not work as expected.
Sponsored by: Essen Hackathon
Added:
head/tests/sys/netpfil/pf/set_skip.sh (contents, props changed)
Modified:
head/tests/sys/netpfil/pf/Makefile
Modified: head/tests/sys/netpfil/pf/Makefile
==============================================================================
--- head/tests/sys/netpfil/pf/Makefile Sat Aug 11 16:40:03 2018 (r337645)
+++ head/tests/sys/netpfil/pf/Makefile Sat Aug 11 16:41:07 2018 (r337646)
@@ -10,7 +10,8 @@ ATF_TESTS_SH+= pass_block \
fragmentation \
set_tos \
route_to \
- synproxy
+ synproxy \
+ set_skip
${PACKAGE}FILES+= utils.subr \
echo_inetd.conf \
Added: head/tests/sys/netpfil/pf/set_skip.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/tests/sys/netpfil/pf/set_skip.sh Sat Aug 11 16:41:07 2018 (r337646)
@@ -0,0 +1,36 @@
+# $FreeBSD$
+
+. $(atf_get_srcdir)/utils.subr
+
+atf_test_case "set_skip_group" "cleanup"
+set_skip_group_head()
+{
+ atf_set descr 'Basic set skip test'
+ atf_set require.user root
+}
+
+set_skip_group_body()
+{
+ # See PR 229241
+ pft_init
+
+ pft_mkjail alcatraz
+ jexec alcatraz ifconfig lo0 127.0.0.1/8 up
+ jexec alcatraz ifconfig lo0 group foo
+ jexec alcatraz pfctl -e
+ pft_set_rules alcatraz "set skip on foo" \
+ "block in proto icmp"
+
+ jexec alcatraz ifconfig
+ atf_check -s exit:0 -o ignore jexec alcatraz ping -c 1 127.0.0.1
+}
+
+set_skip_group_cleanup()
+{
+ pft_cleanup
+}
+
+atf_init_test_cases()
+{
+ atf_add_test_case "set_skip_group"
+}
More information about the svn-src-all
mailing list