dedupe: fix consistent error message prefixes for dedupe tests
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 9 Jan 2017 20:54:18 +0000 (12:54 -0800)
committerEryu Guan <eguan@redhat.com>
Sun, 15 Jan 2017 05:56:45 +0000 (13:56 +0800)
Since we're fixing the xfs_io dedupe command to consistently
print the dedupe ioctl name on error, fix the tests too.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/122
tests/generic/122.out
tests/generic/136
tests/generic/136.out
tests/generic/374
tests/generic/374.out

index 9dcfa9a9d1db45aed17c1c7ad52dae7023b1e39b..5008190ec8dea2eccc54694eceb9473b0c591971 100755 (executable)
@@ -67,7 +67,7 @@ _compare_range $testdir/file1 0 $testdir/file2 0 "$((blksz * 8))" \
 echo "(Fail to) dedupe the middle blocks together"
 free_before=$(stat -f -c '%a' $testdir)
 _dedupe_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
-               $((blksz * 4)) $((blksz * 2)) >> $seqres.full
+               $((blksz * 4)) $((blksz * 2)) 2>&1 | _filter_dedupe_error
 _test_cycle_mount
 free_after=$(stat -f -c '%a' $testdir)
 echo "freesp changed by $free_before -> $free_after" >> $seqres.full
index 7925e903ff324bda7e2352087ba56d5d11a2c866..4459985ca31ab50fb589d0c3517dad8452669e46 100644 (file)
@@ -4,7 +4,7 @@ Create the original files
 5e3501f97fd2669babfcbd3e1972e833  TEST_DIR/test-122/file2
 Files 1-2 do not match (intentional)
 (Fail to) dedupe the middle blocks together
-dedupe: Extents did not match.
+XFS_IOC_FILE_EXTENT_SAME: Extents did not match.
 Compare sections
 35ac8d7917305c385c30f3d82c30a8f6  TEST_DIR/test-122/file1
 5e3501f97fd2669babfcbd3e1972e833  TEST_DIR/test-122/file2
index c72d11fd5259b8f188cc166c720d37fc81917bae..665749f42a5e6d6d593388d8b41dd59d0cf4cc2c 100755 (executable)
@@ -85,7 +85,7 @@ echo "Dedupe the last blocks together"
 echo "1->2"
 _dedupe_range $testdir/file1 $blksz $testdir/file2 $blksz 37 >> $seqres.full
 echo "1->3"
-_dedupe_range $testdir/file1 $blksz $testdir/file3 $blksz 37 >> $seqres.full
+_dedupe_range $testdir/file1 $blksz $testdir/file3 $blksz 37 2>&1 | _filter_dedupe_error
 _test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
index f76f40a3a76e5c3d198703311fb603489d48bc15..508953f6a92b91bd6611332e7415467c75124ee1 100644 (file)
@@ -7,7 +7,7 @@ c4fd505be25a0c91bcca9f502b9a8156  TEST_DIR/test-136/file2
 Dedupe the last blocks together
 1->2
 1->3
-dedupe: Extents did not match.
+XFS_IOC_FILE_EXTENT_SAME: Extents did not match.
 c4fd505be25a0c91bcca9f502b9a8156  TEST_DIR/test-136/file1
 c4fd505be25a0c91bcca9f502b9a8156  TEST_DIR/test-136/file2
 07ac67bf7f271195442509e79cde4cee  TEST_DIR/test-136/file3
index eabaf2e1ca2fb1743c133e58276f66696b42e71e..5a24ec8f6f44a8ce604750d8ea0b07b1365e4988 100755 (executable)
@@ -70,7 +70,7 @@ _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 >> $seqres.full
+_dedupe_range $testdir/file 0 $othertestdir/otherfile 0 $sz 2>&1 | _filter_dedupe_error
 
 filter_md5()
 {
index b9a207339e10ef082491d2538aa9dde7fffd0be3..3243ad3da1a9168a728700d384ec16799795eb27 100644 (file)
@@ -3,7 +3,7 @@ Format and mount
 Mount otherdir
 Create file
 Dedupe one file to another
-dedupe: Invalid cross-device link
+XFS_IOC_FILE_EXTENT_SAME: Invalid cross-device link
 Check output
 2d61aa54b58c2e94403fb092c3dbc027  SCRATCH_MNT/test-374/file
 2d61aa54b58c2e94403fb092c3dbc027  OTHER_DIR/test-374/otherfile