git: 41667b04e5d5 - main - stress2: Only extract the allocation with the exact name "pts"

From: Peter Holm <pho_at_FreeBSD.org>
Date: Sun, 10 Dec 2023 08:37:26 UTC
The branch main has been updated by pho:

URL: https://cgit.FreeBSD.org/src/commit/?id=41667b04e5d56888e90ad80b39930aa5fb66aad2

commit 41667b04e5d56888e90ad80b39930aa5fb66aad2
Author:     Peter Holm <pho@FreeBSD.org>
AuthorDate: 2023-12-10 08:34:38 +0000
Commit:     Peter Holm <pho@FreeBSD.org>
CommitDate: 2023-12-10 08:34:38 +0000

    stress2: Only extract the  allocation with the exact name "pts"
---
 tools/test/stress2/misc/pts2.sh | 4 ++--
 1 file 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."; }