From: Liu Bo <bo.li.liu@oracle.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH] Fstests: btrfs/027 unmount scratch device if test fails
Date: Tue, 16 Jan 2018 13:10:18 -0700 [thread overview]
Message-ID: <20180116201018.2008-2-bo.li.liu@oracle.com> (raw)
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>
---
tests/btrfs/027 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/btrfs/027 b/tests/btrfs/027
index 625a27f..689cd4c 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
--
2.5.0
reply other threads:[~2018-01-16 21:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180116201018.2008-2-bo.li.liu@oracle.com \
--to=bo.li.liu@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox