git: 51e0c428749c - main - stress2: Added more robust test termination

From: Peter Holm <pho_at_FreeBSD.org>
Date: Fri, 21 Nov 2025 08:51:05 UTC
The branch main has been updated by pho:

URL: https://cgit.FreeBSD.org/src/commit/?id=51e0c428749c0bd6ed90191a6a9fbfed28a0f98e

commit 51e0c428749c0bd6ed90191a6a9fbfed28a0f98e
Author:     Peter Holm <pho@FreeBSD.org>
AuthorDate: 2025-11-21 08:48:02 +0000
Commit:     Peter Holm <pho@FreeBSD.org>
CommitDate: 2025-11-21 08:48:02 +0000

    stress2: Added more robust test termination
---
 tools/test/stress2/misc/syzkaller59.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/test/stress2/misc/syzkaller59.sh b/tools/test/stress2/misc/syzkaller59.sh
index 1644ce627934..24cfbfd23278 100755
--- a/tools/test/stress2/misc/syzkaller59.sh
+++ b/tools/test/stress2/misc/syzkaller59.sh
@@ -147,7 +147,14 @@ int main(void)
 EOF
 mycc -o /tmp/syzkaller59 -Wall -Wextra -O0 /tmp/syzkaller59.c || exit 1
 
-(cd /tmp; timeout 3m ./syzkaller59)
+(cd /tmp; ./syzkaller59) &
+start=`date +%s`
+while [ $((`date +%s` - start)) -lt 180 ]; do
+	sleep 10
+	kill -0 $! > /dev/null 2>&1 || break
+done
+while pkill syzkaller59; do sleep .1; done
+wait
 
 rm -rf /tmp/syzkaller59 /tmp/syzkaller59.c /tmp/syzkaller59.core \
     /tmp/syzkaller.??????