aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2018-01-16 13:10:18 -0700
committerEryu Guan <eguan@redhat.com>2018-01-18 22:10:42 +0800
commit67c2db9a18914c7247808969183ffb88471bbf22 (patch)
tree2d7d76932e35e87f062c62fedce2105aa457f85f
parent372e96e92ce570a75aa6d6cf1f39c05fc28e05d7 (diff)
downloadxfstests-dev-67c2db9a18914c7247808969183ffb88471bbf22.tar.gz
btrfs/027: unmount scratch device if test fails
This test, btrfs/027, runs tests against different raid profiles in a loop, if one of them aborts, it also fails the following ones with errors like, Test -m raid10 -d raid10 ERROR: /dev/xxx is mounted Test -m raid5 -d raid5 ERROR: /dev/xxx is mounted Test -m raid6 -d raid6 ERROR: /dev/xxx is mounted _scratch_unmount is added to avoid the above. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
-rwxr-xr-xtests/btrfs/0272
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/btrfs/027 b/tests/btrfs/027
index 625a27f5b4..689cd4cde6 100755
--- a/tests/btrfs/027
+++ b/tests/btrfs/027
@@ -95,6 +95,7 @@ run_test()
$SCRATCH_MNT >>$seqres.full 2>&1
if [ $? -ne 0 ]; then
echo "btrfs replace failed"
+ _scratch_unmount
_spare_dev_put
_scratch_dev_pool_put
return
@@ -102,6 +103,7 @@ run_test()
$BTRFS_UTIL_PROG scrub start -B $SCRATCH_MNT >>$seqres.full 2>&1
if [ $? -ne 0 ]; then
echo "btrfs scrub failed"
+ _scratch_unmount
_spare_dev_put
_scratch_dev_pool_put
return