aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Holm <pho@FreeBSD.org>2021-05-26 06:05:55 +0000
committerPeter Holm <pho@FreeBSD.org>2021-05-26 06:05:55 +0000
commit79f27053e4e072afaf808c06e59c734b72e82c9b (patch)
tree5858ad689cab641143621b260389d3674057dd09 /tools
parent5184e2da41921dfec5a3668756890b5c073fbad9 (diff)
downloadsrc-79f27053e4e072afaf808c06e59c734b72e82c9b.tar.gz
src-79f27053e4e072afaf808c06e59c734b72e82c9b.zip
stress2: Fix cleanup on exit
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test/stress2/misc/force7.sh7
1 files changed, 6 insertions, 1 deletions
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