linux/tools/testing/selftests/timers
Wake Liu 05d89fe7e4 selftests/timers: Clean up kernel version check in posix_timers
Several tests in the posix_timers selftest which test timer behavior
related to SIG_IGN fail on kernels older than 6.13. This is due to
a refactoring of signal handling in commit caf77435dd ("signal:
Handle ignored signals in do_sigaction(action != SIG_IGN)").

A previous attempt to fix this by adding a kernel version check to each
of the nine affected tests was suboptimal, as it resulted in emitting
the same skip message nine times.

Following the suggestion from Thomas Gleixner, this is refactored to
perform a single version check in main(). To satisfy the kselftest
framework's requirement for the test count to match the declared plan,
the plan is now conditionally set to 10 (for older kernels) or 19.

While setting the plan conditionally may seem complex, it is the
better approach to avoid the alternatives: either running tests on
unsupported kernels that are known to fail, or emitting a noisy series
of nine identical skip messages. A single informational message is now
printed instead when the tests are skipped.

Signed-off-by: Wake Liu <wakel@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250807085042.1690931-1-wakel@google.com/
Link: https://patch.msgid.link/20251103114502.584940-1-wakel@google.com
History 2025-11-14 20:34:50 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
adjtick.c selftests:timers: remove local CLOCKID defines 2024-10-14 16:15:13 -06:00
alarmtimer-suspend.c selftests:timers: remove local CLOCKID defines 2024-10-14 16:15:13 -06:00
change_skew.c selftests/timers: Remove unused NSEC_PER_SEC macro 2024-09-06 13:37:41 -06:00
clocksource-switch.c selftests: timers: clocksource-switch: Adapt progress to kselftest framework 2025-01-14 17:06:31 -07:00
freq-step.c selftests: timers: ksft_exit functions do not return 2024-05-06 13:57:21 -06:00
inconsistency-check.c selftests:timers: remove local CLOCKID defines 2024-10-14 16:15:13 -06:00
leap-a-day.c selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines 2024-10-14 16:15:12 -06:00
leapcrash.c selftests: timers: ksft_exit functions do not return 2024-05-06 13:57:21 -06:00
Makefile selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines 2024-10-14 16:15:12 -06:00
mqueue-lat.c selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines 2024-10-14 16:15:12 -06:00
nanosleep.c selftests:timers: remove local CLOCKID defines 2024-10-14 16:15:13 -06:00
nsleep-lat.c selftests:timers: remove local CLOCKID defines 2024-10-14 16:15:13 -06:00
posix_timers.c selftests/timers: Clean up kernel version check in posix_timers 2025-11-14 20:34:50 +01:00
raw_skew.c selftests:timers: remove local CLOCKID defines 2024-10-14 16:15:13 -06:00
rtcpie.c selftests/timers: remove unused irqcount variable 2024-07-11 11:23:54 -06:00
set-2038.c selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines 2024-10-14 16:15:12 -06:00
set-tai.c selftests: timers: ksft_exit functions do not return 2024-05-06 13:57:21 -06:00
set-timer-lat.c selftests:timers: remove local CLOCKID defines 2024-10-14 16:15:13 -06:00
set-tz.c selftests: timers: ksft_exit functions do not return 2024-05-06 13:57:21 -06:00
settings selftests/timers: Turn off timeout setting 2020-08-20 15:49:28 -06:00
skew_consistency.c selftests/timers: Improve skew_consistency by testing with other clockids 2025-03-21 19:16:18 +01:00
threadtest.c kselftest: timers: Fix const correctness 2024-08-21 00:48:48 -06:00
valid-adjtimex.c selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines 2024-10-14 16:15:12 -06:00