diff options
Diffstat (limited to 'tests/cp/fiemap-perf')
-rwxr-xr-x | tests/cp/fiemap-perf | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/cp/fiemap-perf b/tests/cp/fiemap-perf index dbb2a817a..c88e8eca8 100755 --- a/tests/cp/fiemap-perf +++ b/tests/cp/fiemap-perf @@ -20,14 +20,24 @@ print_ver_ cp # Require a fiemap-enabled FS. -# Note we don't check a file here as that could enable -# the test on ext3 where emulated extent scanning can be slow. -fiemap_capable_ . \ - || skip_ "this file system lacks FIEMAP support" +touch fiemap_chk +fiemap_capable_ fiemap_chk || + skip_ "this file system lacks FIEMAP support" + +# Exclude ext3 (or unknown fs types) +# as the emulated extent scanning is slow +df -t ext3 . >/dev/null && + skip_ "ext3 has known slow FIEMAP scanning" # Create a large-but-sparse file. timeout 10 truncate -s1T f || framework_failure_ +# Disable this test on old BTRFS (e.g. Fedora 14) +# which reports (unwritten) extents for holes. +filefrag f || skip_test_ 'the `filefrag` utility is missing' +filefrag f | grep -F ': 0 extents found' > /dev/null || + skip_test_ 'this file system reports extents for holes' + # Nothing can read (much less write) that many bytes in so little time. timeout 10 cp f f2 || fail=1 |