Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kselftests: timers: freq-step: Update maximum acceptable precision and errors

PTI has a significant impact on precision of the MONOTONIC_RAW clock,
which prevents a lot of computers from running the freq-step test.
Increase the maximum acceptable precision for the test to not be skipped
to 500 nanoseconds.

After commit 78b98e3c5a66 ("timekeeping/ntp: Determine the multiplier
directly from NTP tick length") the frequency and time errors should be
much smaller. Reduce the maximum acceptable values for the test to pass
to 0.02 ppm and 50 nanoseconds respectively.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Stephen Boyd <stephen.boyd@linaro.org>
Link: https://lkml.kernel.org/r/20190618160612.21957-1-mlichvar@redhat.com

authored by

Miroslav Lichvar and committed by
Thomas Gleixner
d21e43f2 d897a4ab

+3 -3
+3 -3
tools/testing/selftests/timers/freq-step.c
··· 21 21 #define SAMPLE_READINGS 10 22 22 #define MEAN_SAMPLE_INTERVAL 0.1 23 23 #define STEP_INTERVAL 1.0 24 - #define MAX_PRECISION 100e-9 25 - #define MAX_FREQ_ERROR 10e-6 26 - #define MAX_STDDEV 1000e-9 24 + #define MAX_PRECISION 500e-9 25 + #define MAX_FREQ_ERROR 0.02e-6 26 + #define MAX_STDDEV 50e-9 27 27 28 28 #ifndef ADJ_SETOFFSET 29 29 #define ADJ_SETOFFSET 0x0100