diff mbox series

fstests: btrfs/219 cloned-device mount capability update

Message ID 39311089b30f9250ff7f7a0aabb70547616a4b3a.1698230869.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series fstests: btrfs/219 cloned-device mount capability update | expand

Commit Message

Anand Jain Oct. 25, 2023, 10:49 a.m. UTC
This test case originally checked for failed cloned device mounts, which
is no longer relevant after the commit a5b8a5f9f835 ("btrfs: support
cloned-device mount capability"). So removing the obsolete part.

For older kernels without this commit, the test case still serves its core
purpose.

Additionally, add this test case back to the auto group which reverts the
commit e2e7b549380a ("fstests: btrfs/219: remove it from auto group") since
the previously missing kernel commit 5f58d783fd78 ("btrfs: free device in
btrfs_close_devices for a single device filesystem") has already been
integrated.

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>
---
 tests/btrfs/219 | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

Filipe Manana Oct. 25, 2023, 3:31 p.m. UTC | #1
On Wed, Oct 25, 2023 at 11:51 AM Anand Jain <anand.jain@oracle.com> wrote:
>
> This test case originally checked for failed cloned device mounts, which
> is no longer relevant after the commit a5b8a5f9f835 ("btrfs: support
> cloned-device mount capability"). So removing the obsolete part.
>
> For older kernels without this commit, the test case still serves its core
> purpose.
>
> Additionally, add this test case back to the auto group which reverts the
> commit e2e7b549380a ("fstests: btrfs/219: remove it from auto group") since
> the previously missing kernel commit 5f58d783fd78 ("btrfs: free device in
> btrfs_close_devices for a single device filesystem") has already been
> integrated.
>
> 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>
> ---
>  tests/btrfs/219 | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/tests/btrfs/219 b/tests/btrfs/219
> index b747ce34fcc4..44296c119b0a 100755
> --- a/tests/btrfs/219
> +++ b/tests/btrfs/219
> @@ -12,7 +12,7 @@
>  #
>
>  . ./common/preamble
> -_begin_fstest quick volume
> +_begin_fstest auto quick volume
>
>  # Override the default cleanup function.
>  _cleanup()
> @@ -79,15 +79,6 @@ _mount $loop_dev $loop_mnt > /dev/null 2>&1 || \
>         _fail "Failed to mount the second time"
>  $UMOUNT_PROG $loop_mnt
>
> -# 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.
> -_btrfs_forget_or_module_reload
> -
> -_mount $loop_dev $loop_mnt > /dev/null 2>&1 || \
> -       _fail "Failed to mount the third time"
> -_mount -o loop $fs_img2 $loop_mnt1 > /dev/null 2>&1 && \
> -       _fail "We were allowed to mount when we should have failed"
> -

For kernels without the cloned-device feature, it's useful to still
test this... We want to catch regressions on stable releases and
downstream (distros).
Rather than removing this code, I would rather run the code only if
the kernel does not support the feature (file
/sys/fs/btrfs/features/temp_fsid does not exist).

Thanks.

>  _btrfs_rescan_devices
>  # success, all done
>  echo "Silence is golden"
> --
> 2.31.1
>
diff mbox series

Patch

diff --git a/tests/btrfs/219 b/tests/btrfs/219
index b747ce34fcc4..44296c119b0a 100755
--- a/tests/btrfs/219
+++ b/tests/btrfs/219
@@ -12,7 +12,7 @@ 
 #
 
 . ./common/preamble
-_begin_fstest quick volume
+_begin_fstest auto quick volume
 
 # Override the default cleanup function.
 _cleanup()
@@ -79,15 +79,6 @@  _mount $loop_dev $loop_mnt > /dev/null 2>&1 || \
 	_fail "Failed to mount the second time"
 $UMOUNT_PROG $loop_mnt
 
-# 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.
-_btrfs_forget_or_module_reload
-
-_mount $loop_dev $loop_mnt > /dev/null 2>&1 || \
-	_fail "Failed to mount the third time"
-_mount -o loop $fs_img2 $loop_mnt1 > /dev/null 2>&1 && \
-	_fail "We were allowed to mount when we should have failed"
-
 _btrfs_rescan_devices
 # success, all done
 echo "Silence is golden"