diff mbox series

[1/3] fstests: generic/373: change test to validate cross-vfsmount reflink

Message ID 57a8ad46edcacf08778b16c9eadb603a1638bf17.1648153387.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series fstests: cross-vfsmount reflink changes | expand

Commit Message

Josef Bacik March 24, 2022, 8:24 p.m. UTC
We now allow cross-vfsmount reflinks so change the test to validate that
cross-vfsmount reflinks work.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 tests/generic/373     | 8 ++++----
 tests/generic/373.out | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Dave Chinner March 25, 2022, 12:07 a.m. UTC | #1
On Thu, Mar 24, 2022 at 04:24:32PM -0400, Josef Bacik wrote:
> We now allow cross-vfsmount reflinks so change the test to validate that
> cross-vfsmount reflinks work.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
>  tests/generic/373     | 8 ++++----
>  tests/generic/373.out | 2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)

LGTM.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
diff mbox series

Patch

diff --git a/tests/generic/373 b/tests/generic/373
index 2f68b24f..e85308c7 100755
--- a/tests/generic/373
+++ b/tests/generic/373
@@ -4,7 +4,7 @@ 
 #
 # FS QA Test No. 373
 #
-# Check that cross-mountpoint reflink doesn't work.
+# Check that cross-mountpoint reflink works.
 #
 . ./common/preamble
 _begin_fstest auto quick clone
@@ -49,17 +49,17 @@  $MOUNT_PROG --bind $SCRATCH_MNT $otherdir
 echo "Create file"
 _pwrite_byte 0x61 0 $sz $testdir/file >> $seqres.full
 
-filter_md5()
+filter_otherdir()
 {
 	_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
+_cp_reflink $testdir/file $othertestdir/otherfile 2>&1 | filter_otherdir
 
 echo "Check output"
 md5sum $testdir/file | _filter_scratch
-test -e $othertestdir/otherfile && echo "otherfile should not exist"
+md5sum $othertestdir/otherfile | filter_otherdir
 
 echo "Unmount otherdir"
 $UMOUNT_PROG $otherdir
diff --git a/tests/generic/373.out b/tests/generic/373.out
index 60f280fc..51f5c62b 100644
--- a/tests/generic/373.out
+++ b/tests/generic/373.out
@@ -3,7 +3,7 @@  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
+2d61aa54b58c2e94403fb092c3dbc027  OTHER_DIR/test-373/otherfile
 Unmount otherdir