X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=blobdiff_plain;f=tests%2Fgeneric%2F554;h=da9bfce5bd289a4394637ee0ab61dcf31506cf55;hp=10ae40358b4fa1f2073312ae8aab97eaff2458c3;hb=08e93fa7cae1d1ce98abf83024450cb6f4cefc3e;hpb=3a82f23e450c2447d43d487e5a35bf6a5f313045 diff --git a/tests/generic/554 b/tests/generic/554 index 10ae4035..da9bfce5 100755 --- a/tests/generic/554 +++ b/tests/generic/554 @@ -4,7 +4,10 @@ # # 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 +# +# This is a regression test for kernel commit: +# 96e6e8f4a68d ("vfs: add missing checks to copy_file_range") # seq=`basename $0` seqres=$RESULT_DIR/$seq @@ -26,7 +29,6 @@ _cleanup() . ./common/filter # real QA test starts here -_supported_os Linux _supported_fs generic rm -f $seqres.full @@ -35,7 +37,7 @@ _require_scratch _require_xfs_io_command "copy_range" _require_scratch_swapfile -_scratch_mkfs 2>&1 >> $seqres.full +_scratch_mkfs >>$seqres.full 2>&1 _scratch_mount rm -f $seqres.full @@ -44,9 +46,9 @@ $XFS_IO_PROG -f -c "pwrite -S 0x61 0 128k" $SCRATCH_MNT/file >> $seqres.full 2>& echo swap files return ETXTBUSY _format_swapfile $SCRATCH_MNT/swapfile 16m -swapon $SCRATCH_MNT/swapfile +_swapon_file $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