From 6035519fcf5aa17084b41790cdc584d881d82c03 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Mon, 5 Oct 2015 18:16:57 -0700 Subject: timers, kselftest: Add 'adjtick' test to validate adjtimex() tick adjustments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Linus Torvalds Cc: Miroslav Lichvar Cc: Nuno Gonçalves Cc: Peter Zijlstra Cc: Prarit Bhargava Cc: Richard Cochran Cc: Shuah Khan Cc: Thomas Gleixner 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 --- tools/testing/selftests/timers/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/testing/selftests/timers/Makefile') diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile index 89a3f44bf355..4a1be1b75a7f 100644 --- a/tools/testing/selftests/timers/Makefile +++ b/tools/testing/selftests/timers/Makefile @@ -8,7 +8,7 @@ LDFLAGS += -lrt -lpthread TEST_PROGS = posix_timers nanosleep nsleep-lat set-timer-lat mqueue-lat \ inconsistency-check raw_skew threadtest rtctest -TEST_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex change_skew \ +TEST_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex adjtick change_skew \ skew_consistency clocksource-switch leap-a-day \ leapcrash set-tai set-2038 @@ -24,6 +24,7 @@ include ../lib.mk run_destructive_tests: run_tests ./alarmtimer-suspend ./valid-adjtimex + ./adjtick ./change_skew ./skew_consistency ./clocksource-switch -- cgit v1.2.3-59-g8ed1b