common/reflink: fix error messages in _require_scratch_dedupe()
authorAnthony Iliopoulos <ailiopoulos@suse.com>
Wed, 10 Oct 2018 23:55:50 +0000 (01:55 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 14 Oct 2018 13:42:01 +0000 (21:42 +0800)
In case dedupe returns an error in _require_scratch_dedupe(),
report the error for the scratch rather than for the test
filesystem.

Signed-off-by: Anthony Iliopoulos <ailiopoulos@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/reflink

index e26632774f8a671636a242d44caec407f78222f5..11561a762544157e85a308eec67bb3884d390381 100644 (file)
@@ -145,11 +145,11 @@ _require_scratch_dedupe()
        $XFS_IO_PROG -f -c "pwrite -S 0x61 0 65536" "$SCRATCH_MNT/file2" > /dev/null
        testio="$($XFS_IO_PROG -f -c "dedupe $SCRATCH_MNT/file1 0 0 65536" "$SCRATCH_MNT/file2" 2>&1)"
        echo $testio | grep -q "Operation not supported" && \
-               _notrun "Dedupe not supported by test filesystem type: $FSTYP"
+               _notrun "Dedupe not supported by scratch filesystem type: $FSTYP"
        echo $testio | grep -q "Inappropriate ioctl for device" && \
-               _notrun "Dedupe not supported by test filesystem type: $FSTYP"
+               _notrun "Dedupe not supported by scratch filesystem type: $FSTYP"
        echo $testio | grep -q "Invalid argument" && \
-               _notrun "Dedupe not supported by test filesystem type: $FSTYP"
+               _notrun "Dedupe not supported by scratch filesystem type: $FSTYP"
        _scratch_unmount
 }