summaryrefslogtreecommitdiff
path: root/tests/init.cfg
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-02-04 22:05:20 +0000
committerPádraig Brady <P@draigBrady.com>2011-02-08 22:46:25 +0000
commit5c3fd50a751a93acf5ad7bb69d01261267a53a1e (patch)
tree4bfb77b4702a9068f774a9cb9fa9b64e4deec4a3 /tests/init.cfg
parent480c0dc9e7c1890b11797c0e7704bd0e2e9821b7 (diff)
downloadcoreutils-5c3fd50a751a93acf5ad7bb69d01261267a53a1e.tar.xz
test: improve the cp fiemap tests
* tests/cp/fiemap-2: Enable the fiemap check for files, which will enable the test for files on ext3. * tests/cp/fiemap-perf: Comment why we're not enabling for ext3. * tests/cp/sparse-fiemap: Ditto. Also sync the files before doing a fiemap which was needed for ext4 loop back at least. Add a comment that FIEMAP_FLAG_SYNC is ineffective, thus requiring the explicit syncs. * tests/fiemap-capable: A new python script to determine if a specified path supports fiemap. * tests/init.cfg (fiemap_capable_): Use the new python script. * tests/Makefile.am (EXTRA_DIST): Include the new python script.
Diffstat (limited to 'tests/init.cfg')
-rw-r--r--tests/init.cfg13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/init.cfg b/tests/init.cfg
index b2d1bab81..ceb944811 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -295,13 +295,16 @@ require_proc_pid_status_()
kill $pid
}
-# Return nonzero if the specified directory is on a file system for
-# which FIEMAP support exists, and the file system type is new enough
-# (unlike ext2 and ext3) that it is hard to find an instance *without*
-# FIEMAP support.
+# Return nonzero if the specified path is on a file system for
+# which FIEMAP support exists. Note some file systems (like ext3)
+# only support FIEMAP for files, not directories.
fiemap_capable_()
{
- df -T -t btrfs -t xfs -t ext4 -t ocfs2 -t gfs2 "$@"
+ if ! python < /dev/null; then
+ echo 'fiemap_capable_: python missing: assuming not fiemap capable' 1>&2
+ return 1
+ fi
+ python $abs_srcdir/fiemap-capable "$@"
}
# Does the current (working-dir) file system support sparse files?