File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -673,6 +673,43 @@ large_cleanup()
673673 pft_cleanup
674674}
675675
676+ atf_test_case " show_recursive" " cleanup"
677+ show_recursive_head ()
678+ {
679+ atf_set descr ' Test displaying tables in every anchor'
680+ atf_set require.user root
681+ }
682+
683+ show_recursive_body ()
684+ {
685+ pft_init
686+
687+ vnet_mkjail alcatraz
688+
689+ pft_set_rules alcatraz \
690+
691+ (echo " table <bar> persist"
692+ echo " block in quick from <bar> to any"
693+ ) | jexec alcatraz pfctl -a anchorage -f -
694+
695+ pft_set_rules noflush alcatraz \
696+ " table <foo> counters { 192.0.2.1 }" \
697+ " pass in from <foo>" \
698+ " anchor anchorage"
699+
700+ jexec alcatraz pfctl -sr -a " *"
701+
702+ atf_check -s exit:0 -e ignore -o match:' -pa-r-- bar@anchorage' \
703+ jexec alcatraz pfctl -v -a " *" -sT
704+ atf_check -s exit:0 -e ignore -o match:' --a-r-C foo' \
705+ jexec alcatraz pfctl -v -a " *" -sT
706+ }
707+
708+ show_recursive_cleanup ()
709+ {
710+ pft_cleanup
711+ }
712+
676713atf_init_test_cases ()
677714{
678715 atf_add_test_case " v4_counters"
@@ -689,4 +726,5 @@ atf_init_test_cases()
689726 atf_add_test_case " anchor"
690727 atf_add_test_case " flush"
691728 atf_add_test_case " large"
729+ atf_add_test_case " show_recursive"
692730}
You can’t perform that action at this time.
0 commit comments