diff options
Diffstat (limited to 'tests/cp/fiemap-empty')
-rwxr-xr-x | tests/cp/fiemap-empty | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/cp/fiemap-empty b/tests/cp/fiemap-empty index 42d816bb0..64c3254c7 100755 --- a/tests/cp/fiemap-empty +++ b/tests/cp/fiemap-empty @@ -38,8 +38,8 @@ rm falloc.test # which would cause failure of unrelated tests run in parallel. require_file_system_bytes_free_ 800000000 -fallocate -l 600000000 space.test || - skip_test_ 'this test needs at least 600MB free space' +fallocate -l 600MiB space.test || + skip_test_ 'this test needs at least 600MiB free space' # Disable this test on old BTRFS (e.g. Fedora 14) # which reports ordinary extents for unwritten ones. @@ -50,7 +50,7 @@ filefrag -v space.test | grep -F 'unwritten' > /dev/null || rm space.test # Ensure we read a large empty file quickly -fallocate -l 300000000 empty.big || framework_failure +fallocate -l 300MiB empty.big || framework_failure timeout 3 cp --sparse=always empty.big cp.test || fail=1 test $(stat -c %s empty.big) = $(stat -c %s cp.test) || fail=1 rm empty.big cp.test @@ -58,7 +58,7 @@ rm empty.big cp.test # Ensure we handle extents beyond file size correctly. # Note until we support fallocate, we will not maintain # the file allocation. FIXME: amend this test when fallocate is supported. -fallocate -l 10000000 -n unwritten.withdata || framework_failure +fallocate -l 10MiB -n unwritten.withdata || framework_failure dd count=10 if=/dev/urandom conv=notrunc iflag=fullblock of=unwritten.withdata cp unwritten.withdata cp.test || fail=1 test $(stat -c %s unwritten.withdata) = $(stat -c %s cp.test) || fail=1 @@ -68,16 +68,16 @@ rm unwritten.withdata cp.test # The following to generate unaccounted extents followed by a hole, is not # supported by ext4 at least. The ftruncate discards all extents not # accounted for in the size. -# fallocate -l 10000000 -n unacc.withholes +# fallocate -l 10MiB -n unacc.withholes # dd count=10 if=/dev/urandom conv=notrunc iflag=fullblock of=unacc.withholes -# truncate -s20000000 unacc.withholes +# truncate -s20M unacc.withholes # Ensure we handle a hole after empty extents correctly. # Since all extents are accounted for in the size, # we can maintain the allocation independently from # fallocate() support. -fallocate -l 10000000 empty.withholes -truncate -s 20000000 empty.withholes +fallocate -l 10MiB empty.withholes +truncate -s 20M empty.withholes sectors_per_block=$(expr $(stat -c %o .) / 512) cp empty.withholes cp.test || fail=1 test $(stat -c %s empty.withholes) = $(stat -c %s cp.test) || fail=1 |