]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix error reporting (false negatives) in SGID tests
authorFlorian Weimer <fweimer@redhat.com>
Thu, 22 May 2025 12:36:37 +0000 (14:36 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 20 Jun 2025 09:56:25 +0000 (11:56 +0200)
commit80401002011f470d9c6eb604bf734715e9b3a8c2
treee05c4591a8cec1fb31c3cf6f0b4e898f2add570c
parentc6ec750be51643479f2a9d474bdcead930907646
Fix error reporting (false negatives) in SGID tests

And simplify the interface of support_capture_subprogram_self_sgid.

Use the existing framework for temporary directories (now with
mode 0700) and directory/file deletion.  Handle all execution
errors within support_capture_subprogram_self_sgid.  In particular,
this includes test failures because the invoked program did not
exit with exit status zero.  Existing tests that expect exit
status 42 are adjusted to use zero instead.

In addition, fix callers not to call exit (0) with test failures
pending (which may mask them, especially when running with --direct).

Fixes commit 35fc356fa3b4f485bd3ba3114c9f774e5df7d3c2
("elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987)").

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 3a3fb2ed83f79100c116c824454095ecfb335ad7)
elf/tst-dlopen-sgid.c
elf/tst-env-setuid-tunables.c
elf/tst-env-setuid.c
stdlib/tst-secure-getenv.c
support/capture_subprocess.h
support/support_capture_subprocess.c