Date: Wed, 5 Dec 2018 19:53:09 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341605 - head/tests/sys/netpfil/pf Message-ID: <201812051953.wB5Jr9Im081177@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Wed Dec 5 19:53:09 2018 New Revision: 341605 URL: https://svnweb.freebsd.org/changeset/base/341605 Log: pf tests: Add a defer mode test for pfsync Repeat the pfsync test, this time with the 'defer' option enabled. This exercises slightly different code paths. Modified: head/tests/sys/netpfil/pf/pfsync.sh Modified: head/tests/sys/netpfil/pf/pfsync.sh ============================================================================== --- head/tests/sys/netpfil/pf/pfsync.sh Wed Dec 5 19:18:16 2018 (r341604) +++ head/tests/sys/netpfil/pf/pfsync.sh Wed Dec 5 19:53:09 2018 (r341605) @@ -7,12 +7,16 @@ basic_head() { atf_set descr 'Basic pfsync test' atf_set require.user root - - atf_set require.progs scapy } basic_body() { + common_body +} + +common_body() +{ + defer=$1 pfsynct_init epair_sync=$(pft_mkepair) @@ -28,12 +32,14 @@ basic_body() jexec one ifconfig pfsync0 \ syncdev ${epair_sync}a \ maxupd 1 \ + $defer \ up jexec two ifconfig ${epair_two}a 198.51.100.2/24 up jexec two ifconfig ${epair_sync}b 192.0.2.2/24 up jexec two ifconfig pfsync0 \ syncdev ${epair_sync}b \ maxupd 1 \ + $defer \ up # Enable pf! @@ -64,7 +70,25 @@ basic_cleanup() pfsynct_cleanup } +atf_test_case "defer" "cleanup" +defer_head() +{ + atf_set descr 'Defer mode pfsync test' + atf_set require.user root +} + +defer_body() +{ + common_body defer +} + +defer_cleanup() +{ + pfsynct_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" + atf_add_test_case "defer" }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812051953.wB5Jr9Im081177>