aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-05-21 08:43:32 +0200
committerFlorian Weimer <fweimer@redhat.com>2025-05-21 08:50:10 +0200
commit515d4166f4dbcf43b1568e3f63a19d9a92b2d50e (patch)
treebb8f25be93aaae22fa6b9e0eed4dc9a479e6cdca
parent899dd3ab2fc2bff6b8d37345ee34b7b1ef23fa0c (diff)
downloadglibc-515d4166f4dbcf43b1568e3f63a19d9a92b2d50e.zip
glibc-515d4166f4dbcf43b1568e3f63a19d9a92b2d50e.tar.gz
glibc-515d4166f4dbcf43b1568e3f63a19d9a92b2d50e.tar.bz2
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 <sam@gentoo.org> (cherry picked from commit 35fc356fa3b4f485bd3ba3114c9f774e5df7d3c2)
-rw-r--r--NEWS1
-rw-r--r--elf/tst-dlopen-sgid.c12
2 files changed, 11 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 51586aa..e5d4a83 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ The following bugs were resolved with this release:
[32882] tst-audit10 fails with SIGILL on CPUs without AVX
[32897] dynamic-link: pthread_getattr_np fails when executable stack
tunable is set
+ [32987] elf: Fix subprocess status handling for tst-dlopen-sgid
Version 2.41
diff --git a/elf/tst-dlopen-sgid.c b/elf/tst-dlopen-sgid.c
index 47829a4..5688b79 100644
--- a/elf/tst-dlopen-sgid.c
+++ b/elf/tst-dlopen-sgid.c
@@ -26,6 +26,8 @@
#include <support/check.h>
#include <support/support.h>
#include <support/temp_file.h>
+#include <support/test-driver.h>
+#include <sys/wait.h>
#include <unistd.h>
/* 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;
}