aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Holm <pho@FreeBSD.org>2023-12-10 08:34:38 +0000
committerPeter Holm <pho@FreeBSD.org>2023-12-10 08:34:38 +0000
commit41667b04e5d56888e90ad80b39930aa5fb66aad2 (patch)
tree8937d759bab9857d0c511524e655e3eee280d8a6
parentae77041e0714627f9ec8045ca9ee2b6ea563138e (diff)
downloadsrc-41667b04e5d56888e90ad80b39930aa5fb66aad2.tar.gz
src-41667b04e5d56888e90ad80b39930aa5fb66aad2.zip
stress2: Only extract the allocation with the exact name "pts"
-rwxr-xr-xtools/test/stress2/misc/pts2.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/test/stress2/misc/pts2.sh b/tools/test/stress2/misc/pts2.sh
index 84f7bbd78255..32adb98f2cfe 100755
--- a/tools/test/stress2/misc/pts2.sh
+++ b/tools/test/stress2/misc/pts2.sh
@@ -40,11 +40,11 @@ sed '1,/^EOF/d' < $here/$0 > pts2.c
mycc -o pts2 -Wall -Wextra -O2 pts2.c || exit 1
rm -f pts2.c
-pts=`vmstat -m | grep pts | awk '{print $2}'`
+pts=`vmstat -m | awk '/ pts / {print $2}'`
for i in `jot 10`; do
/tmp/pts2
done
-new=`vmstat -m | grep pts | awk '{print $2}'`
+new=`vmstat -m | awk '/ pts / {print $2}'`
s=0
[ $((new - pts)) -gt 1 ] && { s=1; echo "Leaked $((new - pts)) pts."; }