summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2023-02-23 20:28:51 +0000
committerPádraig Brady <P@draigBrady.com>2023-02-24 00:35:18 +0000
commit5c8c2a5161c0b6f84212778f694c526105f10dab (patch)
tree32b8c10cc43c62121d6cebaeeac389d9d6965990 /tests/cp
parentd899f9e3320bb2a4727ca894163f6b104118c973 (diff)
downloadcoreutils-5c8c2a5161c0b6f84212778f694c526105f10dab.tar.gz
tests: determine if SEEK_HOLE is enabled
Upcomming gnulib changes may disable SEEK_HOLE even if the system supports it, so dynamically check if we've SEEK_HOLE enabled. * init.cfg (seek_data_capable_): SEEK_DATA may be disabled in the build if the system support is deemed insufficient, so also use `cp --debug` to determine if it's enabled. * tests/cp/sparse-2.sh: Adjust to a more general diagnostic. * tests/cp/sparse-extents-2.sh: Likewise. * tests/cp/sparse-extents.sh: Likewise. * tests/cp/sparse-perf.sh: Likewise.
Diffstat (limited to 'tests/cp')
-rwxr-xr-xtests/cp/sparse-2.sh2
-rwxr-xr-xtests/cp/sparse-extents-2.sh2
-rwxr-xr-xtests/cp/sparse-extents.sh2
-rwxr-xr-xtests/cp/sparse-perf.sh2
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/cp/sparse-2.sh b/tests/cp/sparse-2.sh
index 852d96da7..3024055e6 100755
--- a/tests/cp/sparse-2.sh
+++ b/tests/cp/sparse-2.sh
@@ -21,7 +21,7 @@ print_ver_ cp stat dd
touch sparse_chk
seek_data_capable_ sparse_chk \
- || skip_ "this file system lacks SEEK_DATA support"
+ || skip_ "insufficient SEEK_DATA support"
# Exercise the code that handles a file ending in a hole.
printf x > k || framework_failure_
diff --git a/tests/cp/sparse-extents-2.sh b/tests/cp/sparse-extents-2.sh
index 46be86166..575dbbfc6 100755
--- a/tests/cp/sparse-extents-2.sh
+++ b/tests/cp/sparse-extents-2.sh
@@ -26,7 +26,7 @@ touch sparse_chk
if seek_data_capable_ sparse_chk && ! df -t ext3 . >/dev/null; then
: # Current partition has working extents. Good!
else
- skip_ "current file system has insufficient SEEK_DATA support"
+ skip_ "insufficient SEEK_DATA support"
# It's not; we need to create one, hence we need root access.
require_root_
diff --git a/tests/cp/sparse-extents.sh b/tests/cp/sparse-extents.sh
index 410116877..5009f098c 100755
--- a/tests/cp/sparse-extents.sh
+++ b/tests/cp/sparse-extents.sh
@@ -23,7 +23,7 @@ require_sparse_support_
touch sparse_chk || framework_failure_
seek_data_capable_ sparse_chk ||
- skip_ 'this file system lacks SEEK_DATA support'
+ skip_ 'insufficient SEEK_DATA support'
fallocate --help >/dev/null || skip_ 'The fallocate utility is required'
touch falloc.test || framework_failure_
diff --git a/tests/cp/sparse-perf.sh b/tests/cp/sparse-perf.sh
index 2ce9359be..793ecee18 100755
--- a/tests/cp/sparse-perf.sh
+++ b/tests/cp/sparse-perf.sh
@@ -28,7 +28,7 @@ timeout 10 truncate -s1T f ||
# between the creation of the file and the use of SEEK_DATA,
# for it to determine it's an empty file (return ENXIO).
seek_data_capable_ f ||
- skip_ "this file system lacks appropriate SEEK_DATA support"
+ skip_ "insufficient SEEK_DATA support"
# Nothing can read that many bytes in so little time.
timeout 10 cp --reflink=never f f2 || fail=1