Pádraig Brady <[email protected]> writes: > On 06/10/2026 02:41, Collin Funk wrote: >> Bruno Haible <[email protected]> writes: >> >>> The CI reports that the new misc/exec-bad-unicode test fails >>> (during "make distcheck", not during "make check"). >>> The system is an Ubuntu 24.04/x86_64. >>> >>> Find attached the log file. >> Here is the error: >> --- /dev/null 1970-01-01 >> +++ err 1970-01-01 >> + sed 's/^/+/' err >> +ERROR: ld.so: object >> '/home/runner/work/ci-check/ci-check/coreutils/tests/torture/taint/a' from >> LD_PRELOAD cannot be preloaded (cannot read file data): ignored. >> +ERROR: ld.so: object 'b/coreutils-2026-10-06/src/libstdbuf.so' from >> LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. >> + return 1 >> + case $? in >> + return 1 >> I guess I could remove the checks that standard error is empty. > > We could skip the test in this edge case. > If you search for the following, you can > see other tests that do that: > > "unsafe absolute build directory name"
Ah, I didn't notice that. I pushed the attached patch. I considered just skipping the check for 'stdbuf'. However, since running 'make distcheck' will first run 'make check' in the current working directory, it didn't feel worth the extra lines of code. Thanks both, Collin
>From 9a38bb918681dbacac26ad160c9da23c4ccca067 Mon Sep 17 00:00:00 2001 Message-ID: <9a38bb918681dbacac26ad160c9da23c4ccca067.1791343439.git.collin.fu...@gmail.com> From: Collin Funk <[email protected]> Date: Tue, 6 Oct 2026 19:56:06 -0700 Subject: [PATCH] tests: misc: skip a test if the absolute top build dir is unsafe Without this change, this test would fail during 'make distcheck', for example. * tests/misc/exec-bad-unicode.sh: Skip the test if $abs_top_builddir has spaces or special characters. * cfg.mk (_tb_misc): Also match tests/misc/exec-bad-unicode.sh. Reported by Bruno Haible. --- cfg.mk | 2 +- tests/misc/exec-bad-unicode.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index 8fe20500d..83dc26f40 100644 --- a/cfg.mk +++ b/cfg.mk @@ -988,7 +988,7 @@ exclude_file_name_regexp--sc_prohibit_continued_string_alpha_in_column_1 = \ ^src/(system\.h|od\.c|printf\.c|getlimits\.c)$$ _cksum = ^tests/cksum/cksum-base64\.pl$$ -_tb_misc = misc/(stdbuf|responsive) +_tb_misc = misc/(exec-bad-unicode|stdbuf|responsive) exclude_file_name_regexp--sc_prohibit_test_backticks = \ ^tests/(local\.mk|(init|$(_tb_misc)|factor/create-test)\.sh)$$|$(_cksum) diff --git a/tests/misc/exec-bad-unicode.sh b/tests/misc/exec-bad-unicode.sh index 387d838bd..097305951 100755 --- a/tests/misc/exec-bad-unicode.sh +++ b/tests/misc/exec-bad-unicode.sh @@ -19,6 +19,15 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src +# stdbuf fails when the absolute top build dir name contains e.g., +# space, TAB, NL +lf=' +' +case $abs_top_builddir in + *[\\\"\#\$\&\'\`$lf\ \ ]*) + skip_ "unsafe absolute build directory name: $abs_top_builddir";; +esac + script="$(bad_unicode)" # Create a program with invalid Unicode in its name. -- 2.55.0
