From: John Stultz <jstultz@google.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: John Stultz <jstultz@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Boyd <sboyd@kernel.org>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Shuah Khan <shuah@kernel.org>,
Miroslav Lichvar <mlichvar@redhat.com>,
linux-kselftest@vger.kernel.org, kernel-team@android.com,
Lei Chen <lei.chen@smartx.com>
Subject: [PATCH v2 2/2] selftests/timers: Improve skew_consistency by testing with other clockids
Date: Thu, 20 Mar 2025 13:03:01 -0700 [thread overview]
Message-ID: <20250320200306.1712599-2-jstultz@google.com> (raw)
In-Reply-To: <20250320200306.1712599-1-jstultz@google.com>
Lei Chen reported a bug with CLOCK_MONOTONIC_COARSE having
inconsistencies when NTP is adjusting the clock frequency.
This has gone seemingly undetected for ~15 years, illustrating a
clear gap in our testing.
The skew_consistency test is intended to catch this sort of
problem, but was focused on only evaluating CLOCK_MONOTONIC, and
thus missed the problem on CLOCK_MONOTONIC_COARSE.
So adjust the test to run with all clockids for 60 seconds each
instead of 10 minutes with just CLOCK_MONOTONIC.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: linux-kselftest@vger.kernel.org
Cc: kernel-team@android.com
Cc: Lei Chen <lei.chen@smartx.com>
Reported-by: Lei Chen <lei.chen@smartx.com>
Closes: https://lore.kernel.org/lkml/20250310030004.3705801-1-lei.chen@smartx.com/
Signed-off-by: John Stultz <jstultz@google.com>
---
tools/testing/selftests/timers/skew_consistency.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/timers/skew_consistency.c b/tools/testing/selftests/timers/skew_consistency.c
index 83450145fe657..46c391d7f45dc 100644
--- a/tools/testing/selftests/timers/skew_consistency.c
+++ b/tools/testing/selftests/timers/skew_consistency.c
@@ -47,7 +47,7 @@ int main(int argc, char **argv)
pid = fork();
if (!pid)
- return system("./inconsistency-check -c 1 -t 600");
+ return system("./inconsistency-check -t 60");
ppm = 500;
ret = 0;
--
2.49.0.395.g12beb8f557-goog
next prev parent reply other threads:[~2025-03-20 20:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-20 20:03 [PATCH v2 1/2] time/timekeeping: Fix possible inconsistencies in _COARSE clockids John Stultz
2025-03-20 20:03 ` John Stultz [this message]
2025-03-25 11:32 ` Miroslav Lichvar
2025-03-27 9:22 ` Thomas Gleixner
2025-03-27 15:42 ` Miroslav Lichvar
2025-03-27 17:32 ` Thomas Gleixner
2025-03-31 7:53 ` Miroslav Lichvar
2025-04-17 2:55 ` John Stultz
2025-03-31 14:53 ` Miroslav Lichvar
2025-04-01 6:34 ` Thomas Gleixner
2025-04-01 11:19 ` Miroslav Lichvar
2025-04-01 18:29 ` Thomas Gleixner
2025-04-03 8:32 ` Miroslav Lichvar
2025-04-03 11:29 ` Thomas Gleixner
2025-04-05 21:40 ` [PATCH] timekeeping: Prevent coarse clocks going backwards Thomas Gleixner
2025-04-17 5:29 ` John Stultz
2025-04-17 12:36 ` Thomas Gleixner
2025-04-18 0:46 ` John Stultz
2025-04-18 6:37 ` Thomas Gleixner
2025-04-18 7:00 ` Thomas Gleixner
2025-04-19 5:55 ` John Stultz
2025-04-18 18:40 ` John Stultz
2025-04-19 5:46 ` [PATCH v3] " John Stultz
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=20250320200306.1712599-2-jstultz@google.com \
--to=jstultz@google.com \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=kernel-team@android.com \
--cc=lei.chen@smartx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mlichvar@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).