All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] fstests: test adjustments for the reflink behavior change
@ 2022-03-11 16:20 Josef Bacik
  2022-03-11 16:20 ` [PATCH 1/2] fstests: delete the cross-vfsmount reflink tests Josef Bacik
  2022-03-11 16:20 ` [PATCH 2/2] fstests: btrfs/029: delete the cross vfsmount checks Josef Bacik
  0 siblings, 2 replies; 5+ messages in thread
From: Josef Bacik @ 2022-03-11 16:20 UTC (permalink / raw)
  To: fstests, linux-btrfs

Hello,

The cross-vfsmount reflink restriction is being lifted, and as such these tests
are no longer valid.  I've had these patches in the btrfs staging branch for a
few weeks so they've been thoroughly tested.  Thanks,

Josef

Josef Bacik (2):
  fstests: delete the cross-vfsmount reflink tests
  fstests: btrfs/029: delete the cross vfsmount checks

 tests/btrfs/029       |  9 +-----
 tests/btrfs/029.out   |  6 ----
 tests/generic/373     | 70 -------------------------------------------
 tests/generic/373.out |  9 ------
 tests/generic/374     | 68 -----------------------------------------
 tests/generic/374.out | 10 -------
 6 files changed, 1 insertion(+), 171 deletions(-)
 delete mode 100755 tests/generic/373
 delete mode 100644 tests/generic/373.out
 delete mode 100755 tests/generic/374
 delete mode 100644 tests/generic/374.out

-- 
2.26.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] fstests: delete the cross-vfsmount reflink tests
  2022-03-11 16:20 [PATCH 0/2] fstests: test adjustments for the reflink behavior change Josef Bacik
@ 2022-03-11 16:20 ` Josef Bacik
  2022-03-14  4:37   ` Dave Chinner
  2022-03-11 16:20 ` [PATCH 2/2] fstests: btrfs/029: delete the cross vfsmount checks Josef Bacik
  1 sibling, 1 reply; 5+ messages in thread
From: Josef Bacik @ 2022-03-11 16:20 UTC (permalink / raw)
  To: fstests, linux-btrfs

Cross vfsmount reflink's are now allowed, the patch is in linux-next and
will go to linus soon.  Remove these tests so nobody freaks out when
they start failing.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 tests/generic/373     | 70 -------------------------------------------
 tests/generic/373.out |  9 ------
 tests/generic/374     | 68 -----------------------------------------
 tests/generic/374.out | 10 -------
 4 files changed, 157 deletions(-)
 delete mode 100755 tests/generic/373
 delete mode 100644 tests/generic/373.out
 delete mode 100755 tests/generic/374
 delete mode 100644 tests/generic/374.out

diff --git a/tests/generic/373 b/tests/generic/373
deleted file mode 100755
index 2f68b24f..00000000
--- a/tests/generic/373
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /bin/bash
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2016 Oracle, Inc.  All Rights Reserved.
-#
-# FS QA Test No. 373
-#
-# Check that cross-mountpoint reflink doesn't work.
-#
-. ./common/preamble
-_begin_fstest auto quick clone
-
-_register_cleanup "_cleanup" BUS
-
-# Override the default cleanup function.
-_cleanup()
-{
-	cd /
-	rm -rf $tmp.*
-	wait
-}
-
-# Import common functions.
-. ./common/filter
-. ./common/reflink
-
-# real QA test starts here
-_supported_fs generic
-_require_scratch_reflink
-_require_cp_reflink
-
-echo "Format and mount"
-_scratch_mkfs > $seqres.full 2>&1
-_scratch_mount >> $seqres.full 2>&1
-
-testdir=$SCRATCH_MNT/test-$seq
-mkdir $testdir
-otherdir=/tmp/m.$seq
-othertestdir=$otherdir/test-$seq
-rm -rf $otherdir
-mkdir $otherdir
-
-blocks=1
-blksz=65536
-sz=$((blksz * blocks))
-
-echo "Mount otherdir"
-$MOUNT_PROG --bind $SCRATCH_MNT $otherdir
-
-echo "Create file"
-_pwrite_byte 0x61 0 $sz $testdir/file >> $seqres.full
-
-filter_md5()
-{
-	_filter_scratch | sed -e "s,$otherdir,OTHER_DIR,g"
-}
-
-echo "Reflink one file to another"
-_cp_reflink $testdir/file $othertestdir/otherfiles 2>&1 | filter_md5
-
-echo "Check output"
-md5sum $testdir/file | _filter_scratch
-test -e $othertestdir/otherfile && echo "otherfile should not exist"
-
-echo "Unmount otherdir"
-$UMOUNT_PROG $otherdir
-rm -rf $otherdir
-
-# success, all done
-status=0
-exit
diff --git a/tests/generic/373.out b/tests/generic/373.out
deleted file mode 100644
index 60f280fc..00000000
--- a/tests/generic/373.out
+++ /dev/null
@@ -1,9 +0,0 @@
-QA output created by 373
-Format and mount
-Mount otherdir
-Create file
-Reflink one file to another
-cp: failed to clone 'OTHER_DIR/test-373/otherfiles' from 'SCRATCH_MNT/test-373/file': Invalid cross-device link
-Check output
-2d61aa54b58c2e94403fb092c3dbc027  SCRATCH_MNT/test-373/file
-Unmount otherdir
diff --git a/tests/generic/374 b/tests/generic/374
deleted file mode 100755
index d9f33bc3..00000000
--- a/tests/generic/374
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /bin/bash
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2016 Oracle, Inc.  All Rights Reserved.
-#
-# FS QA Test No. 374
-#
-# Check that cross-mountpoint dedupe doesn't work.
-#
-. ./common/preamble
-_begin_fstest auto quick clone dedupe
-
-_register_cleanup "_cleanup" BUS
-
-# Override the default cleanup function.
-_cleanup()
-{
-	cd /
-	rm -rf $tmp.*
-	wait
-}
-
-# Import common functions.
-. ./common/filter
-. ./common/reflink
-
-# real QA test starts here
-_supported_fs generic
-_require_scratch_dedupe
-
-echo "Format and mount"
-_scratch_mkfs > $seqres.full 2>&1
-_scratch_mount >> $seqres.full 2>&1
-
-testdir=$SCRATCH_MNT/test-$seq
-mkdir $testdir
-otherdir=/tmp/m.$seq
-othertestdir=$otherdir/test-$seq
-rm -rf $otherdir
-mkdir $otherdir
-
-blocks=1
-blksz=65536
-sz=$((blocks * blksz))
-
-echo "Mount otherdir"
-$MOUNT_PROG --bind $SCRATCH_MNT $otherdir
-
-echo "Create file"
-_pwrite_byte 0x61 0 $sz $testdir/file >> $seqres.full
-_pwrite_byte 0x61 0 $sz $testdir/otherfile >> $seqres.full
-
-echo "Dedupe one file to another"
-_dedupe_range $testdir/file 0 $othertestdir/otherfile 0 $sz 2>&1 | _filter_dedupe_error
-
-filter_md5()
-{
-	_filter_scratch | sed -e "s,$otherdir,OTHER_DIR,g"
-}
-echo "Check output"
-md5sum $testdir/file $othertestdir/otherfile | filter_md5
-
-echo "Unmount otherdir"
-$UMOUNT_PROG $otherdir
-rm -rf $otherdir
-
-# success, all done
-status=0
-exit
diff --git a/tests/generic/374.out b/tests/generic/374.out
deleted file mode 100644
index 3243ad3d..00000000
--- a/tests/generic/374.out
+++ /dev/null
@@ -1,10 +0,0 @@
-QA output created by 374
-Format and mount
-Mount otherdir
-Create file
-Dedupe one file to another
-XFS_IOC_FILE_EXTENT_SAME: Invalid cross-device link
-Check output
-2d61aa54b58c2e94403fb092c3dbc027  SCRATCH_MNT/test-374/file
-2d61aa54b58c2e94403fb092c3dbc027  OTHER_DIR/test-374/otherfile
-Unmount otherdir
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] fstests: btrfs/029: delete the cross vfsmount checks
  2022-03-11 16:20 [PATCH 0/2] fstests: test adjustments for the reflink behavior change Josef Bacik
  2022-03-11 16:20 ` [PATCH 1/2] fstests: delete the cross-vfsmount reflink tests Josef Bacik
@ 2022-03-11 16:20 ` Josef Bacik
  1 sibling, 0 replies; 5+ messages in thread
From: Josef Bacik @ 2022-03-11 16:20 UTC (permalink / raw)
  To: fstests, linux-btrfs

We now allow cross vfsmount reflinks, remove this portion of the test
from btrfs/029.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 tests/btrfs/029     | 9 +--------
 tests/btrfs/029.out | 6 ------
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/tests/btrfs/029 b/tests/btrfs/029
index 1bdbc951..26ca8938 100755
--- a/tests/btrfs/029
+++ b/tests/btrfs/029
@@ -5,8 +5,7 @@
 # FS QA Test No. 029
 #
 # Check if creating a sparse copy ("reflink") of a file on btrfs
-# expectedly fails when it's done between different filesystems or
-# different mount points of the same filesystem.
+# expectedly fails when it's done between different filesystems.
 #
 # For both situations, these actions are executed:
 #    - Copy a file with the reflink=auto option.
@@ -59,12 +58,6 @@ _create_reflinks()
 echo "test reflinks across different devices"
 _create_reflinks $SCRATCH_MNT/original $reflink_test_dir/copy
 
-echo "test reflinks across different mountpoints of same device"
-rm -rf $reflink_test_dir/*
-_mount $SCRATCH_DEV $reflink_test_dir
-_create_reflinks $SCRATCH_MNT/original $reflink_test_dir/copy
-$UMOUNT_PROG $reflink_test_dir
-
 # success, all done
 status=0
 exit
diff --git a/tests/btrfs/029.out b/tests/btrfs/029.out
index f1c88780..93044342 100644
--- a/tests/btrfs/029.out
+++ b/tests/btrfs/029.out
@@ -5,9 +5,3 @@ reflink=auto:
 42d69d1a6d333a7ebdf64792a555e392  TEST_DIR/test-029/copy
 reflink=always:
 cp reflink failed
-test reflinks across different mountpoints of same device
-reflink=auto:
-42d69d1a6d333a7ebdf64792a555e392  SCRATCH_MNT/original
-42d69d1a6d333a7ebdf64792a555e392  TEST_DIR/test-029/copy
-reflink=always:
-cp reflink failed
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] fstests: delete the cross-vfsmount reflink tests
  2022-03-11 16:20 ` [PATCH 1/2] fstests: delete the cross-vfsmount reflink tests Josef Bacik
@ 2022-03-14  4:37   ` Dave Chinner
  2022-03-14 22:48     ` Josef Bacik
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2022-03-14  4:37 UTC (permalink / raw)
  To: Josef Bacik; +Cc: fstests, linux-btrfs

On Fri, Mar 11, 2022 at 11:20:53AM -0500, Josef Bacik wrote:
> Cross vfsmount reflink's are now allowed, the patch is in linux-next and
> will go to linus soon.  Remove these tests so nobody freaks out when
> they start failing.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

Shouldn't these tests be converted to test that cross-vfsmount
reflinks now actually work?

i.e. it's all well and good to remove tests of behaviour we no
longer enforce, but to then not test the new behaviour we allow is
actually working properly....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] fstests: delete the cross-vfsmount reflink tests
  2022-03-14  4:37   ` Dave Chinner
@ 2022-03-14 22:48     ` Josef Bacik
  0 siblings, 0 replies; 5+ messages in thread
From: Josef Bacik @ 2022-03-14 22:48 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests, linux-btrfs

On Mon, Mar 14, 2022 at 03:37:24PM +1100, Dave Chinner wrote:
> On Fri, Mar 11, 2022 at 11:20:53AM -0500, Josef Bacik wrote:
> > Cross vfsmount reflink's are now allowed, the patch is in linux-next and
> > will go to linus soon.  Remove these tests so nobody freaks out when
> > they start failing.
> > 
> > Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> 
> Shouldn't these tests be converted to test that cross-vfsmount
> reflinks now actually work?
> 
> i.e. it's all well and good to remove tests of behaviour we no
> longer enforce, but to then not test the new behaviour we allow is
> actually working properly....
>

Sure, I'll fix it up and run it through a night of our CI tests and then send
the updated patches.  Thanks,

Josef 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-14 22:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 16:20 [PATCH 0/2] fstests: test adjustments for the reflink behavior change Josef Bacik
2022-03-11 16:20 ` [PATCH 1/2] fstests: delete the cross-vfsmount reflink tests Josef Bacik
2022-03-14  4:37   ` Dave Chinner
2022-03-14 22:48     ` Josef Bacik
2022-03-11 16:20 ` [PATCH 2/2] fstests: btrfs/029: delete the cross vfsmount checks Josef Bacik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.