kselftests: timers: Add test for frequency step
Subsystems (3)
Miroslav Lichvar
reviewerPATCH 1/1 kselftests: timers: Add test for frequency step
This test checks the response of the system clock to frequency steps made with adjtimex(). The frequency error and stability of the CLOCK_MONOTONIC clock relative to the CLOCK_MONOTONIC_RAW clock is measured in two intervals following the step. The test fails if values from the second interval exceed specified limits.
--- tools/testing/selftests/timers/Makefile | 5 +- tools/testing/selftests/timers/freq-step.c | 268 +++++++++++++++++++++++++++++ 2 files changed, 271 insertions(+), 2 deletions(-) create mode 100644 tools/testing/selftests/timers/freq-step.c
tools/testing/selftests/timers/Makefile +3 -2
@@ -1,6 +1,6 @@ BUILD_FLAGS = -DKTEST CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS) -LDFLAGS += -lrt -lpthread +LDFLAGS += -lrt -lpthread -lm # these are all "safe" tests that don't modify # system time or require escalated privileges
@@ -8,7 +8,7 @@ TEST_GEN_PROGS = posix_timers nanosleep nsleep-lat set-timer-lat mqueue-lat \ inconsistency-check raw_skew threadtest rtctest TEST_GEN_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex adjtick change_skew \ - skew_consistency clocksource-switch leap-a-day \ + skew_consistency clocksource-switch freq-step leap-a-day \ leapcrash set-tai set-2038 set-tz
@@ -24,6 +24,7 @@ run_destructive_tests: run_tests ./change_skew ./skew_consistency ./clocksource-switch + ./freq-step ./leap-a-day -s -i 10 ./leapcrash ./set-tz
tools/testing/selftests/timers/freq-step.c new file +268 -0
268 lines not on this page · raw message
Signature · 1 line
2.9.3
Quoted 5 lines · Miroslav Lichvar
This test checks the response of the system clock to frequency steps made with
adjtimex(). The frequency error and stability of theCLOCK_MONOTONICclock relative to theCLOCK_MONOTONIC_RAWclock is measured in two intervals following the step. The test fails if values from the second interval exceed specified limits.
Queued this up my tree for testing, targeting 4.13.
Thanks!
-john