generic/554: test only copy to active swap file
PATCH 1/1 generic/554: test only copy to active swap file
Depending on filesystem, copying from active swapfile may be allowed, just as read from swapfile may be allowed.
---
Eryu,
Following feedback by Ted, I've decided it would be better to remove the test case of copy from swap file.
There is no reason to deny that copy, but there is also no reason for us to assert that filesystems must allow this functionality.
Even after removing the copy from test case, test still fails on upstream for all filesystems I tested.
Tests passes with Darrick's copy-file-range-fixes branch.
Thanks,
Amir.
tests/generic/554 | 3 +-- tests/generic/554.out | 1 - 2 files changed, 1 insertion(+), 3 deletions(-)
tests/generic/554 +1 -2
@@ -4,7 +4,7 @@ # # FS QA Test No. 554 # -# Check that we cannot copy_file_range() to/from a swapfile +# Check that we cannot copy_file_range() to a swapfile # seq=`basename $0` seqres=$RESULT_DIR/$seq
@@ -46,7 +46,6 @@ echo swap files return ETXTBUSY _format_swapfile $SCRATCH_MNT/swapfile 16m swapon $SCRATCH_MNT/swapfile $XFS_IO_PROG -f -c "copy_range -l 32k $SCRATCH_MNT/file" $SCRATCH_MNT/swapfile -$XFS_IO_PROG -f -c "copy_range -l 32k $SCRATCH_MNT/swapfile" $SCRATCH_MNT/copy swapoff $SCRATCH_MNT/swapfile # success, all done
tests/generic/554.out +0 -1
@@ -1,4 +1,3 @@ QA output created by 554 swap files return ETXTBUSY copy_range: Text file busy -copy_range: Text file busy
Signature · 1 line
2.17.1
Quoted 4 lines · Amir Goldstein
Depending on filesystem, copying from active swapfile may be allowed, just as read from swapfile may be allowed.
Signed-off-by Amir Goldstein <[email protected]>
LGTM,
--D
Quoted 53 lines
---
Eryu,
Following feedback by Ted, I've decided it would be better to remove the test case of copy from swap file.
There is no reason to deny that copy, but there is also no reason for us to assert that filesystems must allow this functionality.Even after removing the copy from test case, test still fails on upstream for all filesystems I tested.
Tests passes with Darrick's copy-file-range-fixes branch.Thanks,
Amir.tests/generic/554 | 3 +-- tests/generic/554.out | 1 - 2 files changed, 1 insertion(+), 3 deletions(-)tests/generic/554 +1
-2@@ -4,7 +4,7 @@ # # FS QA Test No. 554 # -# Check that we cannot copy_file_range() to/from a swapfile +# Check that we cannot copy_file_range() to a swapfile # seq=`basename $0` seqres=$RESULT_DIR/$seq@@ -46,7 +46,6 @@ echo swap files return ETXTBUSY _format_swapfile $SCRATCH_MNT/swapfile 16m swapon $SCRATCH_MNT/swapfile $XFS_IO_PROG -f -c "copy_range -l 32k $SCRATCH_MNT/file" $SCRATCH_MNT/swapfile -$XFS_IO_PROG -f -c "copy_range -l 32k $SCRATCH_MNT/swapfile" $SCRATCH_MNT/copy swapoff $SCRATCH_MNT/swapfile # success, all donetests/generic/554.out +0
-1@@ -1,4 +1,3 @@ QA output created by 554 swap files return ETXTBUSY copy_range: Text file busy -copy_range: Text file busySignature · 1 line
2.17.1