glibc/sysdeps
Maciej W. Rozycki 9fb237a1c8 nptl: Fix extraneous testing run by tst-rseq-nptl in the test driver
Fix an issue with commit 8f4632deb3 ("Linux: rseq registration tests")
and prevent testing from being run in the process of the test driver
itself rather than just the test child where one has been forked.  The
problem here is the unguarded use of a destructor to call a part of the
testing.  The destructor function, 'do_rseq_destructor_test' is called
implicitly at program completion, however because it is associated with
the executable itself rather than an individual process, it is called
both in the test child *and* in the test driver itself.

Prevent this from happening by providing a guard variable that only
enables test invocation from 'do_rseq_destructor_test' in the process
that has first run 'do_test'.  Consequently extra testing is invoked
from 'do_rseq_destructor_test' only once and in the correct process,
regardless of the use or the lack of of the '--direct' option.  Where
called in the controlling test driver process that has neved called
'do_test' the destructor function silently returns right away without
taking any further actions, letting the test driver fail gracefully
where applicable.

This arrangement prevents 'tst-rseq-nptl' from ever causing testing to
hang forever and never complete, such as currently happening with the
'mips-linux-gnu' (o32 ABI) target.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2024-08-16 14:38:33 +01:00
..
aarch64 aarch64: Regenerate ULPs 2024-08-07 11:02:03 -03:00
alpha
arc ARC: Regenerate ULPs 2024-08-11 15:29:56 +02:00
arm arm: Regenerate ULPs 2024-08-07 11:02:03 -03:00
csky
generic elf: Avoid re-initializing already allocated TLS in dlopen (bug 31717) 2024-08-05 18:26:52 +02:00
gnu sysdeps: Re-flow and sort multiline gnu/Makefile definitions 2024-08-07 11:02:03 -03:00
hppa
htl hurd: Fix missing pthread_ compat symbol in libc 2024-08-01 23:58:51 +02:00
hurd
i386 i386: Regenerate ULPs 2024-08-07 11:02:03 -03:00
ieee754
loongarch LoongArch: Add cfi instructions for _dl_tlsdesc_dynamic 2024-08-09 09:06:17 +08:00
m68k
mach hurd: Fix missing pthread_ compat symbol in libc 2024-08-01 23:58:51 +02:00
microblaze
mips MIPS: Regenerate ULPs 2024-08-08 14:53:53 +02:00
nios2
nptl
or1k
posix
powerpc powerpc64le: Update ulps 2024-08-08 13:42:12 +02:00
pthread
riscv RISC-V: Regenerate ULPs 2024-08-08 14:53:55 +02:00
s390 s390x: Update ulps 2024-08-08 13:01:02 +02:00
sh
sparc sparc: Regenerate ULPs 2024-08-07 11:02:03 -03:00
unix nptl: Fix extraneous testing run by tst-rseq-nptl in the test driver 2024-08-16 14:38:33 +01:00
wordsize-32
wordsize-64
x86 x86: Add Avoid_STOSB tunable to allow NT memset without ERMS 2024-08-15 08:19:15 -07:00
x86_64 x86: Add Avoid_STOSB tunable to allow NT memset without ERMS 2024-08-15 08:19:15 -07:00