From e4d91984dbe149986a455015531f690f119fd605 Mon Sep 17 00:00:00 2001 From: Anna Wilcox Date: Sun, 22 Mar 2026 05:49:35 -0500 Subject: [PATCH] testsuite: Allow passing with musl getopt The illegal-option test was checking for glibc's getopt error pattern. Add the musl error message as well (using grep -E, which is used in other tests as well) so that the test passes on musl libc systems. Signed-off-by: Anna Wilcox --- testsuite/dwz.tests/illegal-option.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/dwz.tests/illegal-option.sh b/testsuite/dwz.tests/illegal-option.sh index f767f4c..a376cd2 100644 --- a/testsuite/dwz.tests/illegal-option.sh +++ b/testsuite/dwz.tests/illegal-option.sh @@ -6,7 +6,7 @@ fi [ $status -eq 1 ] -grep -q ": invalid option -- 'x'" dwz.err +grep -qEe ": (invalid|unrecognized) option.*x" dwz.err grep -q "Usage:" dwz.err cmp 1 $execs/hello @@ -17,7 +17,7 @@ fi [ $status -eq 1 ] -grep -q ": unrecognized option '--x'" dwz.err +grep -qe ": unrecognized option.*x" dwz.err grep -q "Usage:" dwz.err cmp 1 $execs/hello -- 2.52.0