On 16/04/2026 15:50, Bruno Haible wrote:
On CentOS 7, there are two test failures:
1) already reported for a coreutils-9.10 prerelease:
FAIL: tests/cp/sparse-perf
It looks like /dev/shm returns EINVAL for lseek(SEEK_HOLE).
I can't repro on Centos 7.9, but we should be able to skip
in that case though. Patch attached.
I had a quick look at the /dev/shm history and this fix
lines up with early Centos 7:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/mm/shmem.c?id=387aae6fdd7
Searching a little I also see that WSL had a similar issue:
https://github.com/microsoft/WSL/issues/4796
Given these are old issues and that we can't distinguish EINVAL
from cases where we should diagnose, I think it's best
to leave the copy logic as is.
2) new:
FAIL: tests/date/date-locale-hour
Interesting. On Centos 7 these Serbian locales
had an extraneous trailing new line in `locale date_fmt`.
$ for loc in $(locale -a 2>/dev/null); do
test $(LC_ALL="$loc" locale date_fmt | wc -l) -gt 1 && echo $loc
done
sr_ME
sr_ME.utf8
sr_RS
sr_RS.utf8
sr_RS.utf8@latin
sr_RS@latin
The attached fixes that in my testing.From e245adbbc7c019908f14f17ee421a28b92fabb13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Thu, 16 Apr 2026 17:42:33 +0100
Subject: [PATCH] tests: fix false failure on Centos 7
* tests/date/date-locale-hour.sh: Ensure `locale date_fmt`
is propagated exactly, even when it contains trailing new lines,
as was seen with Serbian locales on Centos 7.
---
tests/date/date-locale-hour.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/date/date-locale-hour.sh b/tests/date/date-locale-hour.sh
index e2353ec33..a368fb77d 100755
--- a/tests/date/date-locale-hour.sh
+++ b/tests/date/date-locale-hour.sh
@@ -59,7 +59,8 @@ done
# Make sure 'date' can use the format string given by 'locale date_fmt'
# and that it uses it by default when no format string is given.
for loc in $(locale -a | shuf -n 10); do
- fmt=$(LC_ALL=$loc locale date_fmt)
+ fmt="$(LC_ALL=$loc locale date_fmt; printf x)"
+ fmt=${fmt%$'\n'x} # Retain fmt newlines (seen with Serbian on Centos 7)
if test -n "$fmt"; then
LC_ALL=$loc date -d '2025-10-11T13:00' +"$fmt" > $loc.exp || fail=1
LC_ALL=$loc date -d '2025-10-11T13:00' > $loc.out || fail=1
--
2.53.0
From ad4a9fb82a2d3a7a89ade99ace6cec2a0366cdd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Thu, 16 Apr 2026 18:35:26 +0100
Subject: [PATCH] tests: avoid failure on older Centos 7
* tests/cp/sparse-perf.sh: Old Centos 7 can give EINVAL
from SEEK_DATA on sparse files being copied from /dev/shm.
Avoid this failure as it's not practical to fix.
---
tests/cp/sparse-perf.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/cp/sparse-perf.sh b/tests/cp/sparse-perf.sh
index 2fa95deff..3908958e9 100755
--- a/tests/cp/sparse-perf.sh
+++ b/tests/cp/sparse-perf.sh
@@ -18,6 +18,7 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ cp
+getlimits_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/tests/other-fs-tmpdir"
@@ -30,7 +31,10 @@ truncate -s1M $other_partition_sparse || framework_failure_
# cp should not disable anything by default, even for sparse files. For e.g.
# copy offload is an important performance improvement for sparse files on NFS.
-cp --debug $other_partition_sparse k2 >cp.out || fail=1
+cp --debug $other_partition_sparse k2 >cp.out 2>cp.err; ret=$?
+# Old Centos 7 or WSL 1 can give EINVAL erroneously
+grep -F "$EINVAL" cp.err && skip_ 'received EINVAL when copying sparse file'
+test "$ret" = 0 || { cat cp.err >&2; fail=1; }
cmp $other_partition_sparse k2 || fail=1
grep ': avoided' cp.out && { cat cp.out; fail=1; }
--
2.53.0