git: 6a53b88afa8e - stable/14 - pf tests: test pfTablesTblCount in snmp_pf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Nov 2026 12:23:31 UTC
The branch stable/14 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=6a53b88afa8efb49b97d01a9ce0a8ddbd9696ecc
commit 6a53b88afa8efb49b97d01a9ce0a8ddbd9696ecc
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-18 16:48:48 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-27 12:22:55 +0000
pf tests: test pfTablesTblCount in snmp_pf
This works fine on main, but not on stable/15 so add a test.
PR: 300818
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 5131335c7d48eaec427aa9ed27862ca56e3e95bc)
---
tests/sys/netpfil/pf/snmp.sh | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/sys/netpfil/pf/snmp.sh b/tests/sys/netpfil/pf/snmp.sh
index 37cc4b75cf92..c30bdb21e783 100644
--- a/tests/sys/netpfil/pf/snmp.sh
+++ b/tests/sys/netpfil/pf/snmp.sh
@@ -100,6 +100,19 @@ table_body()
atf_check -s exit:0 -o match:'pfTablesTblNumber.0 = 1' \
bsnmpwalk -s public@192.0.2.1 -i pf_tree.def begemot
+ # With one address in it
+ atf_check -s exit:0 -o match:'pfTablesTblCount.* = 1' \
+ bsnmpwalk -s public@192.0.2.1 -i pf_tree.def pfTables
+
+ jexec alcatraz pfctl -T add -t foo 198.51.100.0/24
+
+ # Give bsnmp time to refresh the table
+ sleep 6
+
+ # And now there are two
+ atf_check -s exit:0 -o match:'pfTablesTblCount.* = 2' \
+ bsnmpwalk -s public@192.0.2.1 -i pf_tree.def pfTables
+
# We have the 'foo' table
atf_check -s exit:0 -o match:'pfTablesTblDescr.* = foo' \
bsnmpwalk -s public@192.0.2.1 -i pf_tree.def pfTables