opnsense-src/lib/libc/tests/stdlib
Dag-Erling Smørgrav c4c3753542 system(3): Address test robustness issue
Don't assume that SIGINT and SIGQUIT are set to SIG_DFL at the start
of the test.  Instead, retrieve their current dispositions and verify
that they are restored at the end of the test.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55709

(cherry picked from commit 48368f702423742b2a7dff7ad3191625e8bf26f0)

system(3): Fix brain glitch in previous commit

We were saving SIGINT twice instead of SIGINT and SIGQUIT.

Also restore original order of operations (SIGINT then SIGQUIT), which
matches the order in which they're discussed in the POSIX description
of system(3).

MFC after:	1 week
Sponsored by:	Klara, Inc.
Fixes:		48368f702423 ("system(3): Address test robustness issue")

(cherry picked from commit 863b5c137a98d29dc6964cba0e0c4fe2a8bebab8)
2026-03-11 14:16:10 +01:00
..
dynthr_mod Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libatexit libc: tests: add some tests for __cxa_atexit handling 2025-04-04 19:47:54 -05:00
clearenv_test.c libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
cxa_atexit_test.c libc: tests: add some tests for __cxa_atexit handling 2025-04-04 19:47:54 -05:00
cxa_thread_atexit_nothr_test.cc libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
cxa_thread_atexit_test.cc libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
dynthr_test.c libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
getenv_r_test.c getenv_r tests: Fix getenv_r_erange 2025-05-06 13:49:17 +00:00
heapsort_test.c libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
libc_exit_test.c libc tests: Add some test cases for recursive exiting 2024-08-07 16:06:11 +00:00
Makefile system(3): Write our own tests 2026-03-04 14:45:00 +00:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mergesort_test.c libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
qsort_b_test.c libc: add test case for qsort_b(3) 2022-09-06 23:11:46 -07:00
qsort_bench.c libc: Drop incorrect qsort optimization 2025-08-15 09:23:03 +02:00
qsort_r_compat_test.c libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
qsort_r_test.c libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
qsort_s_test.c libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
qsort_test.c libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
set_constraint_handler_s_test.c libc: Purge unneeded cdefs.h 2023-11-01 16:44:30 -06:00
strfmon_test.c strfmon: Fix negative sign handling for C locale 2025-12-03 02:29:13 +00:00
system_test.c system(3): Address test robustness issue 2026-03-11 14:16:10 +01:00
test-sort.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
tsearch_test.c tdestroy(3): add tests 2026-01-05 02:44:21 +02:00