summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-04-16 15:36:28 -0700
committerEryu Guan <guaneryu@gmail.com>2019-04-21 23:37:19 +0800
commitd0e484ac699f53328a9005b7c1dfa27c747f44d9 (patch)
tree9fded500b2ecb5a770f140b6a27e1e91cc86380e /check
parent5bb196119dff10adbf25f294104371226d307344 (diff)
check: wipe scratch devices between tests
Wipe the scratch devices in between each test to ensure that tests are formatting them and not making assumptions about previous contents. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Diffstat (limited to 'check')
-rwxr-xr-xcheck6
1 files changed, 4 insertions, 2 deletions
diff --git a/check b/check
index 0f141703..8677141b 100755
--- a/check
+++ b/check
@@ -483,9 +483,8 @@ _check_filesystems()
if [ -f ${RESULT_DIR}/require_scratch ]; then
_check_scratch_fs || err=true
rm -f ${RESULT_DIR}/require_scratch*
- else
- _scratch_unmount 2> /dev/null
fi
+ _scratch_unmount 2> /dev/null
}
_expunge_test()
@@ -625,6 +624,8 @@ for section in $HOST_OPTIONS_SECTIONS; do
echo "check: failed to mount \$SCRATCH_DEV using specified options"
status=1
exit
+ else
+ _scratch_unmount
fi
fi
@@ -737,6 +738,7 @@ for section in $HOST_OPTIONS_SECTIONS; do
# _check_dmesg depends on this log in dmesg
touch ${RESULT_DIR}/check_dmesg
fi
+ _try_wipe_scratch_devs > /dev/null 2>&1
if [ "$DUMP_OUTPUT" = true ]; then
./$seq 2>&1 | tee $tmp.out
# Because $? would get tee's return code