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

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



We now allow cross-vfsmount reflinks so change the test to validate that
cross-vfsmount reflinks work.

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

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
-- 
2.26.3




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux