@@ -97,9 +97,17 @@ _dedupe_range $testdir1/file1 37 $testdir1/file1 59 23
echo "Try overlapping dedupe"
_dedupe_range $testdir1/file1 0 $testdir1/file1 1 $((blksz * 2))
-echo "Try dedupe past EOF"
+echo "Try dedupe from past EOF"
_dedupe_range $testdir1/file1 $(( (blks + 10) * blksz)) $testdir1/file1 0 $blksz
+echo "Try dedupe to past EOF, destination offset beyond EOF"
+_dedupe_range $testdir1/file1 0 $testdir1/file1 $(( (blks + 10) * blksz )) \
+ $blksz
+
+echo "Try dedupe to past EOF, destination offset behind EOF"
+_dedupe_range $testdir1/file1 0 $testdir1/file1 $(( (blks - 1) * blksz )) \
+ $(( blksz * 2 ))
+
echo "Try to dedupe a dir"
_dedupe_range $testdir1/dir1 0 $testdir1/file2 0 $blksz
@@ -7,7 +7,11 @@ Try unaligned dedupe
dedupe: Invalid argument
Try overlapping dedupe
dedupe: Invalid argument
-Try dedupe past EOF
+Try dedupe from past EOF
+dedupe: Invalid argument
+Try dedupe to past EOF, destination offset beyond EOF
+dedupe: Invalid argument
+Try dedupe to past EOF, destination offset behind EOF
dedupe: Invalid argument
Try to dedupe a dir
XFS_IOC_FILE_EXTENT_SAME: Is a directory