diff options
author | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2008-10-19 16:16:04 +0000 |
---|---|---|
committer | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2008-10-19 16:16:04 +0000 |
commit | dd67253150ac9b8c67154b190107757a1918f578 (patch) | |
tree | cba86d34f212c24ba4345e5884fbab614bc797f6 | |
parent | 3befded1058fe52651d5bf605049465e9006c907 (diff) |
vmstat(8) now reports "InUse" instead of "Releases".
Adopt for ktable/kentry usage/leakage tests.
Also run vmstat verbose, to avoid matching failures
if the pools haven't been used yet.
-rw-r--r-- | regress/sbin/pfctl/pfr.exec | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/regress/sbin/pfctl/pfr.exec b/regress/sbin/pfctl/pfr.exec index 23429fa8ec6..30b4a8c605c 100644 --- a/regress/sbin/pfctl/pfr.exec +++ b/regress/sbin/pfctl/pfr.exec @@ -4,10 +4,10 @@ A='regress' pfctl -a $A -FT 2>/dev/null pfctl -a $A -Fr 2>/dev/null pfctl -a $A -Fn 2>/dev/null -KT_A=`vmstat -m | awk '/pfrktable/{print $3}'` -KT_R=`vmstat -m | awk '/pfrktable/{print $5}'` -KE_A=`vmstat -m | awk '/pfrkentry /{print $3}'` -KE_R=`vmstat -m | awk '/pfrkentry /{print $5}'` +KT_R=`vmstat -mv | awk '/pfrktable/{print $3}'` +KT_I=`vmstat -mv | awk '/pfrktable/{print $5}'` +KE_R=`vmstat -mv | awk '/pfrkentry /{print $3}'` +KE_I=`vmstat -mv | awk '/pfrkentry /{print $5}'` echo "# create" echo "table <regress> persist" | pfctl -a $A -Tl -f - 2>&1 || exit 1 for LINE in `sed -e "s/ /_/g" $1`; do @@ -78,12 +78,12 @@ echo "# kill" pfctl -a $A -FT 2>&1 pfctl -a $A -Fr 2>&1 pfctl -a $A -Fn 2>&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 +let KT_R=`vmstat -mv | awk '/pfrktable/{print $3}'`-$KT_R +let KT_I=`vmstat -mv | awk '/pfrktable/{print $5}'`-$KT_I +let KT_RL=$KT_R-$KT_I +let KE_R=`vmstat -mv | awk '/pfrkentry /{print $3}'`-$KE_R +let KE_I=`vmstat -mv | awk '/pfrkentry /{print $5}'`-$KE_I +let KE_RL=$KE_R-$KE_I +echo "ktable: $KT_R allocated, $KT_RL released, $KT_I leaked." +echo "kentry: $KE_R allocated, $KE_RL released, $KE_I leaked." +[ "$KT_I" = "0" -a "$KE_I" = "0" ] || exit 1 |