aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2023-09-07 00:24:43 +0800
committerZorro Lang <zlang@kernel.org>2023-09-20 15:49:54 +0800
commit1348ed0e256a21a81cbee6b8c93f10b5273cc118 (patch)
tree1b4b0ef5186d31f99f62f1b2ff90982df29da45d
parent6f5c1dcbb72390c226214787a79d340e392bcc58 (diff)
downloadxfstests-dev-1348ed0e256a21a81cbee6b8c93f10b5273cc118.tar.gz
fstests: btrfs/185 update for single device pseudo device-scan
As we are obliterating the need for the device scan for the single device, which will return success if the basic superblock verification passes, even for the duplicate device of the mounted filesystem, drop the check for the return code in this testcase and continue to verify if the device path of the mounted filesystem remains unaltered after the scan. Also, if the test fails, it leaves the local non-standard mount point remained mounted, leading to further test cases failing. Call unmount in _cleanup(). Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Boris Burkov <boris@bur.io> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/btrfs/1855
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/btrfs/185 b/tests/btrfs/185
index ba0200617e..c7b8d2d469 100755
--- a/tests/btrfs/185
+++ b/tests/btrfs/185
@@ -15,6 +15,7 @@ mnt=$TEST_DIR/$seq.mnt
# Override the default cleanup function.
_cleanup()
{
+ $UMOUNT_PROG $mnt > /dev/null 2>&1
rm -rf $mnt > /dev/null 2>&1
cd /
rm -f $tmp.*
@@ -51,9 +52,9 @@ for sb_bytenr in 65536 67108864; do
echo ..:$? >> $seqres.full
done
-# Original device is mounted, scan of its clone should fail
+# Original device is mounted, scan of its clone must not alter the
+# filesystem device path
$BTRFS_UTIL_PROG device scan $device_2 >> $seqres.full 2>&1
-[[ $? != 1 ]] && _fail "cloned device scan should fail"
[[ $(findmnt $mnt | grep -v TARGET | $AWK_PROG '{print $2}') != $device_1 ]] && \
_fail "mounted device changed"