summaryrefslogtreecommitdiff
path: root/regress/sbin/pfctl
diff options
context:
space:
mode:
Diffstat (limited to 'regress/sbin/pfctl')
-rw-r--r--regress/sbin/pfctl/pfr.exec14
-rw-r--r--regress/sbin/pfctl/pfr1.ok2
-rw-r--r--regress/sbin/pfctl/pfr2.ok2
-rw-r--r--regress/sbin/pfctl/pfr3.ok2
-rw-r--r--regress/sbin/pfctl/pfr4.ok2
-rw-r--r--regress/sbin/pfctl/pfr5.ok2
-rw-r--r--regress/sbin/pfctl/pfr6.ok2
-rw-r--r--regress/sbin/pfctl/pfr7.ok2
-rw-r--r--regress/sbin/pfctl/pfr8.ok2
-rw-r--r--regress/sbin/pfctl/pfr9.ok2
10 files changed, 32 insertions, 0 deletions
diff --git a/regress/sbin/pfctl/pfr.exec b/regress/sbin/pfctl/pfr.exec
index bf230c159c0..31deb8014c3 100644
--- a/regress/sbin/pfctl/pfr.exec
+++ b/regress/sbin/pfctl/pfr.exec
@@ -1,4 +1,8 @@
#!/bin/ksh
+KT_A=0`vmstat -m | awk '/pfrktable/{print $3}'`
+KT_R=0`vmstat -m | awk '/pfrktable/{print $5}'`
+KE_A=0`vmstat -m | awk '/pfrkentry/{print $3}'`
+KE_R=0`vmstat -m | awk '/pfrkentry/{print $5}'`
pfctl -t regress -qTk 2>&1 || exit 1
echo "# create"
pfctl -t regress -Tc 2>&1 || exit 1
@@ -39,3 +43,13 @@ echo "# table -v"
pfctl -vsT | grep regress 2>&1 || exit 1
echo "# kill"
pfctl -t regress -Tk 2>&1 || exit 1
+let KT_A=`vmstat -m | awk '/pfrktable/{print $3}'`-$KT_A
+let KT_R=`vmstat -m | awk '/pfrktable/{print $5}'`-$KT_R
+let KT_L=$KT_A-$KT_R
+let KE_A=`vmstat -m | awk '/pfrkentry/{print $3}'`-$KE_A
+let KE_R=`vmstat -m | awk '/pfrkentry/{print $5}'`-$KE_R
+let KE_L=$KE_A-$KE_R
+echo "ktable: $KT_A allocated, $KT_R released, $KT_L leaked."
+echo "kentry: $KE_A allocated, $KE_R released, $KE_L leaked."
+[ "$KT_L" = "0" -a "$KE_L" = "0" ] || exit 1
+
diff --git a/regress/sbin/pfctl/pfr1.ok b/regress/sbin/pfctl/pfr1.ok
index 2b9e269efac..105a634b0d7 100644
--- a/regress/sbin/pfctl/pfr1.ok
+++ b/regress/sbin/pfctl/pfr1.ok
@@ -59,3 +59,5 @@ regress
-pa-- regress
# kill
1 table deleted.
+ktable: 12 allocated, 12 released, 0 leaked.
+kentry: 25 allocated, 25 released, 0 leaked.
diff --git a/regress/sbin/pfctl/pfr2.ok b/regress/sbin/pfctl/pfr2.ok
index 0b1783c411b..223b2c3c94e 100644
--- a/regress/sbin/pfctl/pfr2.ok
+++ b/regress/sbin/pfctl/pfr2.ok
@@ -59,3 +59,5 @@ regress
-pa-- regress
# kill
1 table deleted.
+ktable: 12 allocated, 12 released, 0 leaked.
+kentry: 25 allocated, 25 released, 0 leaked.
diff --git a/regress/sbin/pfctl/pfr3.ok b/regress/sbin/pfctl/pfr3.ok
index 8d30df0cdbe..a83ebaac152 100644
--- a/regress/sbin/pfctl/pfr3.ok
+++ b/regress/sbin/pfctl/pfr3.ok
@@ -58,3 +58,5 @@ regress
-pa-- regress
# kill
1 table deleted.
+ktable: 11 allocated, 11 released, 0 leaked.
+kentry: 30 allocated, 30 released, 0 leaked.
diff --git a/regress/sbin/pfctl/pfr4.ok b/regress/sbin/pfctl/pfr4.ok
index 66fd94eb7a9..f5ac929a97a 100644
--- a/regress/sbin/pfctl/pfr4.ok
+++ b/regress/sbin/pfctl/pfr4.ok
@@ -195,3 +195,5 @@ regress
-pa-- regress
# kill
1 table deleted.
+ktable: 21 allocated, 21 released, 0 leaked.
+kentry: 160 allocated, 160 released, 0 leaked.
diff --git a/regress/sbin/pfctl/pfr5.ok b/regress/sbin/pfctl/pfr5.ok
index 50e7cf70520..70da37b46f9 100644
--- a/regress/sbin/pfctl/pfr5.ok
+++ b/regress/sbin/pfctl/pfr5.ok
@@ -819,3 +819,5 @@ regress
-pa-- regress
# kill
1 table deleted.
+ktable: 81 allocated, 81 released, 0 leaked.
+kentry: 640 allocated, 640 released, 0 leaked.
diff --git a/regress/sbin/pfctl/pfr6.ok b/regress/sbin/pfctl/pfr6.ok
index 196f3728a09..8e43a943501 100644
--- a/regress/sbin/pfctl/pfr6.ok
+++ b/regress/sbin/pfctl/pfr6.ok
@@ -150,3 +150,5 @@ regress
-pa-- regress
# kill
1 table deleted.
+ktable: 26 allocated, 26 released, 0 leaked.
+kentry: 95 allocated, 95 released, 0 leaked.
diff --git a/regress/sbin/pfctl/pfr7.ok b/regress/sbin/pfctl/pfr7.ok
index c4ed9bd0105..d366b51b82a 100644
--- a/regress/sbin/pfctl/pfr7.ok
+++ b/regress/sbin/pfctl/pfr7.ok
@@ -10,3 +10,5 @@ regress
-pa-- regress
# kill
1 table deleted.
+ktable: 1 allocated, 1 released, 0 leaked.
+kentry: 0 allocated, 0 released, 0 leaked.
diff --git a/regress/sbin/pfctl/pfr8.ok b/regress/sbin/pfctl/pfr8.ok
index d6072814801..79b51d43b40 100644
--- a/regress/sbin/pfctl/pfr8.ok
+++ b/regress/sbin/pfctl/pfr8.ok
@@ -20,3 +20,5 @@ regress
-pa-- regress
# kill
1 table deleted.
+ktable: 6 allocated, 6 released, 0 leaked.
+kentry: 10 allocated, 10 released, 0 leaked.
diff --git a/regress/sbin/pfctl/pfr9.ok b/regress/sbin/pfctl/pfr9.ok
index 88fba9efbb7..b21d3d1e921 100644
--- a/regress/sbin/pfctl/pfr9.ok
+++ b/regress/sbin/pfctl/pfr9.ok
@@ -95,3 +95,5 @@ regress
-pa-- regress
# kill
1 table deleted.
+ktable: 21 allocated, 21 released, 0 leaked.
+kentry: 20 allocated, 20 released, 0 leaked.