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

selftests: timers: clocksource-switch: adapt to kselftest framework

So we have proper counters at the end of a test. We also print the
kselftest header at the end of the test, so we don't mix with the output
of the child process. There is only this one test anyhow.

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>

authored by

Wolfram Sang and committed by
Shuah Khan
ce7d1017 248ae6f4

+5 -3
+5 -3
tools/testing/selftests/timers/clocksource-switch.c
··· 183 183 out: 184 184 change_clocksource(orig_clk); 185 185 186 - if (status) 187 - return ksft_exit_fail(); 188 - return ksft_exit_pass(); 186 + /* Print at the end to not mix output with child process */ 187 + ksft_print_header(); 188 + ksft_set_plan(1); 189 + ksft_test_result(!status, "clocksource-switch\n"); 190 + ksft_exit(!status); 189 191 }