glibc/stdlib
Florian Weimer 5a6276d97a 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 35fc356fa3
("elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987)").

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 3a3fb2ed83)
2025-06-20 11:12:24 +02:00
..
bits Fix name space violation in fortify wrappers (bug 32052) 2024-08-06 08:23:15 +02:00
sys
Depend
Makefile stdlib: Test using setenv with updated environ [BZ #32588] 2025-01-25 10:30:58 +08:00
Versions
a64l.c
abort.c
abs.c
add_n.c
addmul_1.c
alloca.h
arc4random.c
arc4random_uniform.c
at_quick_exit.c
atexit.c
atof.c
atoi.c
atol.c
atoll.c
bsearch.c
bug-fmtmsg1.c
bug-getcontext.c
bug-strtod.c
bug-strtod2.c
canonicalize.c
cmp.c
cxa_at_quick_exit.c
cxa_atexit.c
cxa_finalize.c
cxa_thread_atexit_impl.c
dbl2mpn.c
div.c
divmod_1.c
divrem.c
drand48-iter.c
drand48.c
drand48_r.c
erand48.c
erand48_r.c
errno.h
exit.c
exit.h
fmtmsg.c
fmtmsg.h
fpioconst.c
fpioconst.h
gen-fpioconst.c
gen-tst-strtod-round.c
getcontext.c
getentropy.c
getenv.c
getrandom.c
getsubopt.c
gmp-impl.h
gmp.h
grouping.c
grouping.h
groupingwc.c
inlines.c
inttypes.h C2x scanf %b support 2023-06-19 19:40:34 +00:00
isomac.c
jrand48.c
jrand48_r.c
l64a.c
labs.c
lcong48.c
lcong48_r.c
ldbl2mpn.c
ldiv.c
llabs.c
lldiv.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
longlong.h Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
lrand48.c
lrand48_r.c
lshift.c
makecontext.c
mblen.c
mbstowcs.c
mbtowc.c
mod_1.c
monetary.h
mp_clz_tab.c
mpn2dbl.c
mpn2flt.c
mpn2ldbl.c
mrand48.c
mrand48_r.c
msort.c
mul.c
mul_1.c
mul_n.c
nrand48.c
nrand48_r.c
old_atexit.c
on_exit.c
putenv.c
qsort.c
quick_exit.c
rand.c
rand_r.c
random.c
random_r.c
rpmatch.c
rshift.c
secure-getenv.c
seed48.c
seed48_r.c
setcontext.c
setenv.c setenv.c: Get rid of alloca. 2023-06-30 14:31:45 +00:00
srand48.c
srand48_r.c
stdint.h
stdlib.h
strfmon.c
strfmon_l.c
strfrom-skeleton.c
strfromd.c
strfromf.c
strfroml.c
strtod.c
strtod_l.c
strtod_nan.c
strtod_nan_main.c
strtod_nan_narrow.h
strtod_nan_wide.h
strtof.c
strtof_l.c
strtof_nan.c
strtol.c
strtol_l.c Fix special case for C2x strtol binary constant handling (BZ# 30371) 2023-05-25 09:28:23 -03:00
strtold.c
strtold_l.c
strtold_nan.c
strtoll.c
strtoll_l.c
strtoul.c
strtoul_l.c
strtoull.c
strtoull_l.c
sub_n.c
submul_1.c
swapcontext.c
system.c
tens_in_limb.c
test-a64l.c
test-at_quick_exit-race.c
test-atexit-race-common.c
test-atexit-race.c
test-atexit-recursive.c Fix a few more typos I missed in previous round -- BZ 25337 2023-06-02 23:46:32 +00:00
test-bz22786.c
test-canon.c tests: Replace various function calls with their x variant 2023-06-06 08:23:53 -04:00
test-canon2.c
test-cxa_atexit-race.c
test-cxa_atexit-race2.c
test-dlclose-exit-race-helper.c
test-dlclose-exit-race.c
test-on_exit-race.c
testdiv.c
testdiv.input
testmb.c
testmb2.c
testrand.c
testsort.c
tst-abs.c stdlib: Add testcases for abs(). (BZ #30263) 2023-05-16 14:38:07 -04:00
tst-arc4random-fork.c stdlib: Tune down fork arc4random tests 2023-06-12 14:45:16 -03:00
tst-arc4random-stats.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-arc4random-thread.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-at_quick_exit.c
tst-atexit-common.c
tst-atexit.c
tst-atof1.c
tst-atof2.c
tst-bsearch.c
tst-bz20544.c
tst-canon-bz26341.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-cxa_atexit.c
tst-empty-env.c
tst-environ.c
tst-fmtmsg.c
tst-fmtmsg.sh
tst-getrandom.c
tst-labs.c stdlib: Avoid undefined behavior in stdlib/tst-labs 2023-05-17 08:23:59 +02:00
tst-limits.c
tst-llabs.c stdlib: Use long long int in stdlib/tst-llabs 2023-05-17 08:23:45 +02:00
tst-makecontext-align.c
tst-makecontext.c
tst-makecontext2.c
tst-makecontext3.c
tst-on_exit.c
tst-putenv.c
tst-putenvmod.c
tst-qsort.c
tst-qsort2.c
tst-quick_exit.cc
tst-rand48-2.c
tst-rand48.c
tst-random.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-random2.c
tst-realpath-toolong.c
tst-realpath.c stdlib: Improve tst-realpath compatibility with source fortification 2023-08-06 18:13:38 +02:00
tst-secure-getenv.c Fix error reporting (false negatives) in SGID tests 2025-06-20 11:12:24 +02:00
tst-setcontext.c Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
tst-setcontext2.c
tst-setcontext3.c
tst-setcontext3.sh
tst-setcontext4.c
tst-setcontext5.c
tst-setcontext6.c
tst-setcontext7.c
tst-setcontext8.c
tst-setcontext9.c
tst-setenv-environ.c stdlib: Test using setenv with updated environ [BZ #32588] 2025-01-25 10:30:58 +08:00
tst-strfmon_l.c
tst-strfrom-locale.c
tst-strfrom.c
tst-strfrom.h
tst-strtod-nan-locale-main.c
tst-strtod-nan-locale.c
tst-strtod-nan-sign-main.c
tst-strtod-nan-sign.c
tst-strtod-overflow.c
tst-strtod-round-data
tst-strtod-round-data.h
tst-strtod-round-skeleton.c
tst-strtod-round.c
tst-strtod-underflow.c
tst-strtod.c
tst-strtod.h
tst-strtod1i.c
tst-strtod2.c
tst-strtod3.c
tst-strtod4.c
tst-strtod5.c
tst-strtod5i.c
tst-strtod6.c
tst-strtol-binary-c2x.c Fix special case for C2x strtol binary constant handling (BZ# 30371) 2023-05-25 09:28:23 -03:00
tst-strtol-binary-c11.c Fix special case for C2x strtol binary constant handling (BZ# 30371) 2023-05-25 09:28:23 -03:00
tst-strtol-binary-gnu2x.c Fix special case for C2x strtol binary constant handling (BZ# 30371) 2023-05-25 09:28:23 -03:00
tst-strtol-binary-gnu11.c Fix special case for C2x strtol binary constant handling (BZ# 30371) 2023-05-25 09:28:23 -03:00
tst-strtol-binary-main.c Fix special case for C2x strtol binary constant handling (BZ# 30371) 2023-05-25 09:28:23 -03:00
tst-strtol-locale-main.c
tst-strtol-locale.c
tst-strtol.c
tst-strtoll.c
tst-swapcontext1.c
tst-system.c
tst-thread-quick_exit.cc
tst-tininess.c
tst-tls-atexit-lib.c
tst-tls-atexit-nodelete.c
tst-tls-atexit.c
tst-unsetenv1.c
tst-width-stdint.c
tst-width.c
tst-xpg-basename.c
ucontext.h
udiv_qrnnd.c
wcstombs.c
wctomb.c
xpg_basename.c