Hi Bruno, Bruno Haible via GNU coreutils General Discussion <[email protected]> writes:
> The CI reports failures of the test tests/misc/warning-errors in two > circumstances: > > > * On CentOS 7: > > FAIL: tests/misc/warning-errors > =============================== > > [...] > + returns_ 1 /bin/sh -c 'env cksum --debug /dev/null' > 4294967295 0 /dev/null > + fail=1 It looks like the CI machine doesn't have any optimized CRC32 implementations to use. Therefore, 'cksum --debug' won't write to standard error and will return 0. On a powerpc64 machine, I got the same error along with a similar one for 'wc -l', which is only optimized on some x86 and arm machines. I pushed the attached patch to adjust the expected exit status based on values from config.h. Thanks, Collin
>From 74d70180125ecbb52c2f854e63f06f2c133d1040 Mon Sep 17 00:00:00 2001 Message-ID: <74d70180125ecbb52c2f854e63f06f2c133d1040.1772520901.git.collin.fu...@gmail.com> From: Collin Funk <[email protected]> Date: Mon, 2 Mar 2026 22:16:21 -0800 Subject: [PATCH] tests: avoid failure on systems without an optimized 'cksum' or 'wc -l' * tests/misc/warning-errors.sh: Expect 'wc' and 'cksum' to exit successfully if there is not an optimized 'wc -l' implementation or CRC32 implementation. Reported by Bruno Haible. --- tests/misc/warning-errors.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/misc/warning-errors.sh b/tests/misc/warning-errors.sh index 5a1f25457..cea0b618e 100755 --- a/tests/misc/warning-errors.sh +++ b/tests/misc/warning-errors.sh @@ -48,6 +48,16 @@ sort -k 1b,1 > built_programs || framework_failure_ join all_writers built_programs > built_writers || framework_failure_ +# If 'cksum --debug' does not have an optimized CRC32 implementation, no +# warning will be printed to standard error and the command will succeed. +grep -E '^#define (GL_CRC_X86_64_PCLMUL|USE_AVX2_CRC32|USE_AVX512_CRC32'\ +'|USE_PCLMUL_CRC32|USE_VMULL_CRC32) 1' "$CONFIG_HEADER" > /dev/null \ + || expected_failure_status_cksum=0 + +# Likewise for 'wc -l --debug'. +grep -E '^#define (USE_AVX2_WC_LINECOUNT|USE_AVX512_WC_LINECOUNT'\ +'|USE_NEON_WC_LINECOUNT) 1' "$CONFIG_HEADER" > /dev/null \ + || expected_failure_status_wc=0 expected_failure_status_sort=2 expected_failure_status_env=0 # env's exec resets default exit handlers -- 2.53.0
