From: Wake Liu <wakel@google.com>
To: John Stultz <jstultz@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Shuah Khan <shuah@kernel.org>
Cc: Stephen Boyd <sboyd@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
wakel@google.com
Subject: [PATCH] selftests/timers: Skip some posix_timers tests on kernels < 6.13
Date: Thu, 7 Aug 2025 16:50:42 +0800 [thread overview]
Message-ID: <20250807085042.1690931-1-wakel@google.com> (raw)
Several tests in the posix_timers selftest fail on kernels older
than 6.13. These tests check for timer behavior related to SIG_IGN,
which was refactored in the 6.13 kernel cycle, notably by
commit caf77435dd8a ("signal: Handle ignored signals in
do_sigaction(action != SIG_IGN)").
To ensure the selftests pass on older, stable kernels, gate the
affected tests with a ksft_min_kernel_version(6, 13) check.
Signed-off-by: Wake Liu <wakel@google.com>
---
tools/testing/selftests/timers/posix_timers.c | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c
index f0eceb0faf34..f228e51f8b58 100644
--- a/tools/testing/selftests/timers/posix_timers.c
+++ b/tools/testing/selftests/timers/posix_timers.c
@@ -256,6 +256,11 @@ static void *ignore_thread(void *arg)
static void check_sig_ign(int thread)
{
+ if (!ksft_min_kernel_version(6, 13)) {
+ // see caf77435dd8a
+ ksft_test_result_skip("Depends on refactor of posix timers in 6.13\n");
+ return;
+ }
struct tmrsig tsig = { };
struct itimerspec its;
unsigned int tid = 0;
@@ -342,6 +347,10 @@ static void check_sig_ign(int thread)
static void check_rearm(void)
{
+ if (!ksft_min_kernel_version(6, 13)) {
+ ksft_test_result_skip("Depends on refactor of posix timers in 6.13\n");
+ return;
+ }
struct tmrsig tsig = { };
struct itimerspec its;
struct sigaction sa;
@@ -398,6 +407,10 @@ static void check_rearm(void)
static void check_delete(void)
{
+ if (!ksft_min_kernel_version(6, 13)) {
+ ksft_test_result_skip("Depends on refactor of posix timers in 6.13\n");
+ return;
+ }
struct tmrsig tsig = { };
struct itimerspec its;
struct sigaction sa;
@@ -455,6 +468,10 @@ static inline int64_t calcdiff_ns(struct timespec t1, struct timespec t2)
static void check_sigev_none(int which, const char *name)
{
+ if (!ksft_min_kernel_version(6, 13)) {
+ ksft_test_result_skip("Depends on refactor of posix timers in 6.13\n");
+ return;
+ }
struct timespec start, now;
struct itimerspec its;
struct sigevent sev;
@@ -493,6 +510,10 @@ static void check_sigev_none(int which, const char *name)
static void check_gettime(int which, const char *name)
{
+ if (!ksft_min_kernel_version(6, 13)) {
+ ksft_test_result_skip("Depends on refactor of posix timers in 6.13\n");
+ return;
+ }
struct itimerspec its, prev;
struct timespec start, now;
struct sigevent sev;
--
2.50.1.703.g449372360f-goog
next reply other threads:[~2025-08-07 8:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 8:50 Wake Liu [this message]
2025-09-21 7:59 ` Thomas Gleixner
2025-11-03 11:45 ` [PATCH v2] selftests/timers: Clean up kernel version check in posix_timers Wake Liu
2025-11-14 19:39 ` [tip: timers/core] " tip-bot2 for Wake Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250807085042.1690931-1-wakel@google.com \
--to=wakel@google.com \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome