]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/373: change test to validate cross-vfsmount reflink
authorJosef Bacik <josef@toxicpanda.com>
Thu, 24 Mar 2022 20:24:32 +0000 (16:24 -0400)
committerEryu Guan <guaneryu@gmail.com>
Sun, 10 Apr 2022 15:22:47 +0000 (23:22 +0800)
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>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/373
tests/generic/373.out

index 2f68b24f284eaef0b2f02e5cc9bcb575a729a4f1..e85308c7f2e7fbe9c3c7e88d2f229c27eac8a9fd 100755 (executable)
@@ -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
index 60f280fcf6eaaa502e3057fc2ea544e3441cebc9..51f5c62bc12cda86b445a62af33c8701b6fe332d 100644 (file)
@@ -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