For now at least, I want to continue to be able run "expensive"
tests, so added this explicit test for SEEK_HOLE support.
If not available (e.g., on ext4 and tmpfs), skip it.
Otherwise, modern linux w/{btrfs,xfs,ocfs2}, run the test.>From 5f2b9f161777f883225e8b4c8f1303e42b3a4978 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Thu, 2 Aug 2012 14:58:57 +0200 Subject: [PATCH] tests: skip failing test on FS/system that lack SEEK_HOLE support * tests/big-hole: Test for SEEK_HOLE support. If not available, skip this test. Hence, this test is now skipped on linux-3.5.0 with ext4 or tmpfs. The test runs (and passes) with at least btrfs, xfs, or ocfs2. --- tests/big-hole | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/big-hole b/tests/big-hole index 20ade97..df9fa32 100755 --- a/tests/big-hole +++ b/tests/big-hole @@ -5,6 +5,12 @@ expensive_ +# Skip this test if there is no usable SEEK_HOLE support, +# as is the case with linux-3.5.0 on ext4 and tmpfs file systems. +perl -e '$f=*STDERR; sysseek($f,2**22,0); syswrite($f,"a");' \ + -e 'exit !!(0+sysseek($f,0,4))' 2> seek-hole-test \ + || skip_ "this system/FS lacks SEEK_HOLE support" + # Try to make this test not THAT expensive, on typical hosts. virtual_memory_KiB=10240 if echo x | (ulimit -v $virtual_memory_KiB && grep x) >/dev/null 2>&1; then -- 1.7.12.rc1.10.g97c7934
