From: Florian Weimer Date: Wed, 21 May 2025 06:43:32 +0000 (+0200) Subject: elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2caef2827f76af88d495eb382da174896d08900a;p=thirdparty%2Fglibc.git elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987) This should really move into support_capture_subprogram_self_sgid. Reviewed-by: Sam James (cherry picked from commit 35fc356fa3b4f485bd3ba3114c9f774e5df7d3c2) --- diff --git a/NEWS b/NEWS index 1d3de29c15..19b4440bb1 100644 --- a/NEWS +++ b/NEWS @@ -100,6 +100,7 @@ The following bugs are resolved with this release: [32470] x86: Avoid integer truncation with large cache sizes [32582] Fix underallocation of abort_msg_s struct (CVE-2025-0395) [32810] Crash on x86-64 if XSAVEC disable via tunable + [32987] elf: Fix subprocess status handling for tst-dlopen-sgid Version 2.39 diff --git a/elf/tst-dlopen-sgid.c b/elf/tst-dlopen-sgid.c index 47829a405e..5688b79f2e 100644 --- a/elf/tst-dlopen-sgid.c +++ b/elf/tst-dlopen-sgid.c @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include /* This is the name of our test object. Use a custom module for @@ -66,10 +68,16 @@ do_test (void) free (from); } - TEST_COMPARE (support_capture_subprogram_self_sgid (magic_argument), 0); - free (libdir); + int status = support_capture_subprogram_self_sgid (magic_argument); + + if (WEXITSTATUS (status) == EXIT_UNSUPPORTED) + return EXIT_UNSUPPORTED; + + if (!WIFEXITED (status)) + FAIL_EXIT1 ("Unexpected exit status %d from child process\n", status); + return 0; }