Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jun 2022 12:37:24 GMT
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f2c88ed6ba92 - main - stress2: Added a timeout to the test
Message-ID:  <202206201237.25KCbOgt087535@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pho:

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

commit f2c88ed6ba92a0074d6effbba9b0233936fbc603
Author:     Peter Holm <pho@FreeBSD.org>
AuthorDate: 2022-06-20 12:36:57 +0000
Commit:     Peter Holm <pho@FreeBSD.org>
CommitDate: 2022-06-20 12:36:57 +0000

    stress2: Added a timeout to the test
---
 tools/test/stress2/misc/crossmp3.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/test/stress2/misc/crossmp3.sh b/tools/test/stress2/misc/crossmp3.sh
index 0f7c01af5569..5eecb936e900 100755
--- a/tools/test/stress2/misc/crossmp3.sh
+++ b/tools/test/stress2/misc/crossmp3.sh
@@ -86,6 +86,7 @@ else
 	else
 		export runRUNTIME=20s
 		# The test: Parallel mount and unmounts
+		start=`date +%s`
 		for i in `jot 3`; do
 			m=$1
 			mount /dev/md${m} ${mntpoint}$m &&
@@ -101,7 +102,10 @@ else
 				umount $opt ${mntpoint}$m > /dev/null 2>&1
 				[ -f $CONT ] || break 2
 			done
+			[ $((`date +%s` - start)) -gt 600 ] && 
+			    { echo "Timed out"; s=1; }
 		done
 		rm -f $CONT
 	fi
+	exit $s
 fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206201237.25KCbOgt087535>