aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2023-11-02 19:28:21 +0800
committerZorro Lang <zlang@kernel.org>2023-11-16 10:42:39 +0800
commit6a466743cd1748e3eba0f8e949d6e5d53693e1f0 (patch)
treecbdfeca0397b64293e8b7a537971e4b7e4e08c2e
parent7139a0600084b2b8e42cc46743bade5444bd1ba8 (diff)
downloadxfstests-dev-6a466743cd1748e3eba0f8e949d6e5d53693e1f0.tar.gz
btrfs/219: cloned-device mount capability update
This test case checks for failure of the cloned device mounts, which is no longer true after the commit a5b8a5f9f835 ("btrfs: support cloned-device mount capability"). So check for the non-presence the temp-fsid feature and do not test for the failure of the cloned device mount. Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202310251645.5fe5495a-oliver.sang@intel.com Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/btrfs/21911
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/btrfs/219 b/tests/btrfs/219
index 35824df2ba..0bbfd6949c 100755
--- a/tests/btrfs/219
+++ b/tests/btrfs/219
@@ -51,6 +51,7 @@ loop_dev2=""
_require_test
_require_loop
+_require_btrfs_fs_sysfs
_require_btrfs_forget_or_module_loadable
_fixed_by_kernel_commit 5f58d783fd78 \
"btrfs: free device in btrfs_close_devices for a single device filesystem"
@@ -88,14 +89,16 @@ _mount $loop_dev1 $loop_mnt1 > /dev/null 2>&1 || \
_fail "Failed to mount the second time"
$UMOUNT_PROG $loop_mnt1
-# Now we definitely can't mount them at the same time, because we're still tied
-# to the limitation of one fs_devices per fsid.
+# Now try mount them at the same time, if kernel does not support
+# temp-fsid feature then mount will fail.
_btrfs_forget_or_module_reload
_mount $loop_dev1 $loop_mnt1 > /dev/null 2>&1 || \
_fail "Failed to mount the third time"
-_mount $loop_dev2 $loop_mnt2 > /dev/null 2>&1 && \
- _fail "We were allowed to mount when we should have failed"
+if ! _has_btrfs_sysfs_feature_attr temp_fsid; then
+ _mount $loop_dev2 $loop_mnt2 > /dev/null 2>&1 && \
+ _fail "We were allowed to mount when we should have failed"
+fi
_btrfs_rescan_devices
# success, all done