[glibc] elf: preserve exit code in tests
Sam James via Glibc-cvs <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e053ceaa665d1dbd6e775b93ab98131c5d34ccd6 commit e053ceaa665d1dbd6e775b93ab98131c5d34ccd6 Author: Sam James <[email protected]> Date: Sat Aug 8 01:03:18 2026 +0100 elf: preserve exit code in tests Use $fail when we set it rather than just '1' (we already checked that it is non-zero) to make logs more meaningful. (Also, use $rc when we already checked it svalue.) Diff: --- elf/tst-dl-debug-exclude.sh | 2 +- elf/tst-dl-debug-protect.sh | 2 +- elf/tst-tls-debug-recursive.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elf/tst-dl-debug-exclude.sh b/elf/tst-dl-debug-exclude.sh index 9837ffcea8..6c54695091 100644 --- a/elf/tst-dl-debug-exclude.sh +++ b/elf/tst-dl-debug-exclude.sh @@ -79,7 +79,7 @@ if [ $fail -ne 0 ]; then echo "Test FAILED" cat "${debug_output}".* rm -f "${debug_output}".* - exit 1 + exit $fail fi echo "Test PASSED" diff --git a/elf/tst-dl-debug-protect.sh b/elf/tst-dl-debug-protect.sh index 7a9ed1175d..b7c3d7100a 100644 --- a/elf/tst-dl-debug-protect.sh +++ b/elf/tst-dl-debug-protect.sh @@ -43,7 +43,7 @@ rc=$? if test $rc -eq 77; then echo "Test is not supported" rm -f "${output}".* - exit 77 + exit $rc fi output=$(ls "${output}".*) diff --git a/elf/tst-tls-debug-recursive.sh b/elf/tst-tls-debug-recursive.sh index 083e716f72..c978944a71 100755 --- a/elf/tst-tls-debug-recursive.sh +++ b/elf/tst-tls-debug-recursive.sh @@ -74,7 +74,7 @@ if [ $fail -ne 0 ]; then echo "Test FAILED" cat "${debug_output}" rm -f "${debug_output}" - exit 1 + exit $fail fi echo "Test PASSED"