From 79f27053e4e072afaf808c06e59c734b72e82c9b Mon Sep 17 00:00:00 2001 From: Peter Holm Date: Wed, 26 May 2021 08:05:55 +0200 Subject: [PATCH] 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