git: 79f27053e4e0 - main - stress2: Fix cleanup on exit

Peter Holm pho at FreeBSD.org
Wed May 26 06:09:28 UTC 2021


The branch main has been updated by pho:

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

commit 79f27053e4e072afaf808c06e59c734b72e82c9b
Author:     Peter Holm <pho at FreeBSD.org>
AuthorDate: 2021-05-26 06:05:55 +0000
Commit:     Peter Holm <pho at FreeBSD.org>
CommitDate: 2021-05-26 06:05:55 +0000

    stress2: Fix cleanup on exit
---
 tools/test/stress2/misc/force7.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/test/stress2/misc/force7.sh b/tools/test/stress2/misc/force7.sh
index 9eef1936cb98..1e987bc13a72 100755
--- a/tools/test/stress2/misc/force7.sh
+++ b/tools/test/stress2/misc/force7.sh
@@ -71,5 +71,10 @@ while [ $((`date +%s` - start)) -lt 300 ]; do
 	fsck_ffs -fyR /dev/md$mdstart > $log 2>&1; s=$?
 	[ $s -ne 0 ] && break
 done
-[ $s -eq 0 ] && rm -f $diskimage $log || cat $log
+if [ $s -eq 0 ]; then
+	mdconfig -d -u $mdstart
+	rm -f $diskimage $log
+else
+	cat $log
+fi
 exit $s


More information about the dev-commits-src-main mailing list