From: Collin Funk Date: Tue, 3 Mar 2026 05:43:22 +0000 (-0800) Subject: tests: avoid false test failure when using address sanitizer X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8177a9ac16d91720efcc7f78562d44aeff30aa92;p=thirdparty%2Fcoreutils.git tests: avoid false test failure when using address sanitizer * tests/misc/warning-errors.sh: Skip commands which have been built with sanitizers, since standard error will not be closed and checked for errors. Reported by Bruno Haible. --- diff --git a/tests/misc/warning-errors.sh b/tests/misc/warning-errors.sh index cea0b618e4..639a3a01a9 100755 --- a/tests/misc/warning-errors.sh +++ b/tests/misc/warning-errors.sh @@ -64,6 +64,9 @@ expected_failure_status_env=0 # env's exec resets default exit handlers while read writer; do cmd=$(printf '%s\n' "$writer" | cut -d ' ' -f1) || framework_failure_ + # We don't close standard error with sanitizers, which may need to print. + # Therefore, these programs may succeed when they otherwise wouldn't. + sanitizer_build_ $cmd && continue eval "expected=\$expected_failure_status_$cmd" test x$expected = x && expected=1 returns_ $expected \