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.
This commit is contained in:
Collin Funk authored and Pádraig Brady committed 2026-03-03 11:30:19 +00:00
1 parent 74d7018012
commit 8177a9ac16
1 file changed
+3
+3
View File
@@ -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 \