btrfs/112: remove some tests for cloning inline extents
PATCH 1/2 btrfs/112: remove some tests for cloning inline extents
From: Filipe Manana <[email protected]>
This test case, btrfs/112, tests that some clone operations that have a range covering inline extents fail with either -EOPNOTSUPP or -EINVAL. These cases were unsupported on btrfs because they used to lead to file corruptions and were not trivial to implement.
But there's now a patchset that adds support for them, and the relevant patch of that patchset has the following subject:
"Btrfs: implement full reflink support for inline extents"
So just remove these tests from test case btrfs/112, since this test case is about testing only the unsupported reflink operations. A new test case that verifies that these cases now work, as long as some other new cases, will follow in another patch.
--- tests/btrfs/112 | 31 ----------------------------- tests/btrfs/112.out | 48 --------------------------------------------- 2 files changed, 79 deletions(-)
tests/btrfs/112 +0 -31
@@ -83,22 +83,6 @@ test_cloning_inline_extents() od -t x1 $SCRATCH_MNT/foo2 $XFS_IO_PROG -c "pwrite -S 0xee 0 90" $SCRATCH_MNT/foo2 | _filter_xfs_io - # Test cloning the inline extent against a file which has a size of zero - # but has a prealloc extent. It should not be possible as well to clone - # the inline extent from file bar into this file. - $XFS_IO_PROG -f -c "falloc -k 0 1M" $SCRATCH_MNT/foo3 | _filter_xfs_io - $CLONER_PROG -s 0 -d 0 -l 0 $SCRATCH_MNT/bar $SCRATCH_MNT/foo3 \ - | _filter_btrfs_cloner_error - - # Doing IO against any range in the first 4K of the file should work. - # Due to a past clone ioctl bug which allowed cloning the inline extent, - # these operations resulted in EIO errors. - echo "First 50 bytes of foo3 after clone operation:" - # Should not be able to read any bytes, file has 0 bytes i_size (the - # clone operation failed and did not modify our file). - od -t x1 $SCRATCH_MNT/foo3 - $XFS_IO_PROG -c "pwrite -S 0xff 0 90" $SCRATCH_MNT/foo3 | _filter_xfs_io - # Test cloning the inline extent against a file which consists of a # single inline extent that has a size not greater than the size of # bar's inline extent (40 < 50).
@@ -157,21 +141,6 @@ test_cloning_inline_extents() # Must have a size of 50 bytes, with all bytes having a value of 0xbb. od -t x1 $SCRATCH_MNT/foo7 - # Test cloning the inline extent against a file which has a size not - # greater than the size of bar's inline extent (20 < 50) but has - # a prealloc extent that goes beyond the file's size. It should not be - # possible to clone the inline extent from bar into this file. - $XFS_IO_PROG -f -c "falloc -k 0 1M" \ - -c "pwrite -S 0x88 0 20" \ - $SCRATCH_MNT/foo8 | _filter_xfs_io - $CLONER_PROG -s 0 -d 0 -l 0 $SCRATCH_MNT/bar $SCRATCH_MNT/foo8 \ - | _filter_btrfs_cloner_error - - echo "File foo8 data after clone operation:" - # Must have a size of 20 bytes, with all bytes having a value of 0x88 - # (the clone operation did not modify our file). - od -t x1 $SCRATCH_MNT/foo8 - _scratch_unmount }
tests/btrfs/112.out +0 -48
93 lines not on this page · raw message
Signature · 1 line
2.25.0
Quoted 10 lines · On 2/19/20 9:06 AM, [email protected] wrote:
From: Filipe Manana <[email protected]>
This test case, btrfs/112, tests that some clone operations that have a range covering inline extents fail with either
-EOPNOTSUPPor-EINVAL. These cases were unsupported on btrfs because they used to lead to file corruptions and were not trivial to implement.But there's now a patchset that adds support for them, and the relevant patch of that patchset has the following subject:
Quoted 8 lines
"Btrfs: implement full reflink support for inline extents"
So just remove these tests from test case btrfs/112, since this test case is about testing only the unsupported reflink operations. A new test case that verifies that these cases now work, as long as some other new cases, will follow in another patch.
Signed-off-by Filipe Manana <[email protected]>
Thanks,
Josef