]> git.baikalelectronics.ru Git - kernel.git/commit
timers, kselftest: Add 'adjtick' test to validate adjtimex() tick adjustments
authorJohn Stultz <john.stultz@linaro.org>
Tue, 6 Oct 2015 01:16:57 +0000 (18:16 -0700)
committerIngo Molnar <mingo@kernel.org>
Mon, 12 Oct 2015 07:51:34 +0000 (09:51 +0200)
commit8451aff7d5b21d30c62bb12f11b5ee721e46c213
tree03fbc8affa4508d51d6370ee8fcb2e9e4e0d2b6e
parentb9725d36c7ce4932567215547ebdf6e8c828d948
timers, kselftest: Add 'adjtick' test to validate adjtimex() tick adjustments

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

  9c71ac849bd6 ("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>
tools/testing/selftests/timers/Makefile
tools/testing/selftests/timers/adjtick.c [new file with mode: 0644]