History log of /linux-master/tools/testing/selftests/timers/adjtick.c
Revision Date Author Comments
# a8d74fe7 13-Jul-2022 Wolfram Sang <wsa+renesas@sang-engineering.com>

selftests: timers: fix declarations of main()

Mixing up argc/argv went unnoticed because they were not used. Still,
this is worth fixing.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: John Stultz <jstultz@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# fe483192 20-May-2019 Kees Cook <keescook@chromium.org>

selftests/timers: Add missing fflush(stdout) calls

When running under a pipe, some timer tests would not report output in
real-time because stdout flushes were missing after printf()s that lacked
a newline. This adds them to restore real-time status output that humans
can enjoy.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# b8410650 11-Aug-2017 Shuah Khan <shuah@kernel.org>

selftests: timers: drop support for !KTEST case

There is no need to keep timers tests in sync with external timers
repo. Drop support for !KTEST to support for building and running
timers tests without kselftest framework.

Reference: https://lkml.org/lkml/2017/8/10/952
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: John Stultz <john.stultz@linaro.org>


# 6035519f 05-Oct-2015 John Stultz <john.stultz@linaro.org>

timers, kselftest: Add 'adjtick' test to validate adjtimex() tick adjustments

Recently a kernel side NTP bug was fixed via the following commit:

2619d7e9c92d ("time: Fix timekeeping_freqadjust()'s incorrect use of abs() instead of abs64()")

When the bug was reported it was difficult to detect, except by
tweaking the adjtimex tick value, and noticing how quickly the
adjustment took:

https://lkml.org/lkml/2015/9/1/488

Thus this patch introduces a new test which manipulates the
adjtimex tick value and validates that the results are what we
expect.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Nuno Gonçalves <nunojpg@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1444094217-20258-1-git-send-email-john.stultz@linaro.org
[ Tidied up the code and the changelog a bit. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>