Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152815975
D34132.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34132.diff
View Options
diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh
--- a/tests/sys/netpfil/pf/table.sh
+++ b/tests/sys/netpfil/pf/table.sh
@@ -242,6 +242,42 @@
pft_cleanup
}
+atf_test_case "precreate" "cleanup"
+precreate_head()
+{
+ atf_set descr 'Test creating a table without counters, then loading rules that add counters'
+ atf_set require.user root
+}
+
+precreate_body()
+{
+ pft_init
+
+set -x
+ vnet_mkjail alcatraz
+
+ jexec alcatraz pfctl -t foo -T add 192.0.2.1
+ jexec alcatraz pfctl -t foo -T show
+
+ pft_set_rules noflush alcatraz \
+ "table <foo> counters persist" \
+ "pass in from <foo>"
+
+ # Expect all counters to be zero
+ atf_check -s exit:0 -e ignore \
+ -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
+ -o match:'In/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
+ -o match:'Out/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
+ -o match:'Out/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
+ jexec alcatraz pfctl -t foo -T show -vv
+
+}
+
+precreate_cleanup()
+{
+ pft_cleanup
+}
+
atf_init_test_cases()
{
atf_add_test_case "v4_counters"
@@ -250,4 +286,5 @@
atf_add_test_case "automatic"
atf_add_test_case "network"
atf_add_test_case "pr259689"
+ atf_add_test_case "precreate"
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 18, 7:25 AM (17 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31669496
Default Alt Text
D34132.diff (1 KB)
Attached To
Mode
D34132: pf tests: Test adding counters to an existing table
Attached
Detach File
Event Timeline
Log In to Comment