aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/timers
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-07-13 22:46:21 +0200
committerShuah Khan <skhan@linuxfoundation.org>2022-07-14 14:36:52 -0600
commitce7d101750ff8450af16d6e1f6ccba10d44ae9f3 (patch)
tree48e237ab74d8c08a8bf9f26446f7aedec3b5ab18 /tools/testing/selftests/timers
parentselftests: timers: clocksource-switch: add 'runtime' command line parameter (diff)
downloadwireguard-linux-ce7d101750ff8450af16d6e1f6ccba10d44ae9f3.tar.xz
wireguard-linux-ce7d101750ff8450af16d6e1f6ccba10d44ae9f3.zip
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>
Diffstat (limited to 'tools/testing/selftests/timers')
-rw-r--r--tools/testing/selftests/timers/clocksource-switch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/testing/selftests/timers/clocksource-switch.c b/tools/testing/selftests/timers/clocksource-switch.c
index 577e4b74211a..c5264594064c 100644
--- a/tools/testing/selftests/timers/clocksource-switch.c
+++ b/tools/testing/selftests/timers/clocksource-switch.c
@@ -183,7 +183,9 @@ int main(int argc, char **argv)
out:
change_clocksource(orig_clk);
- if (status)
- return ksft_exit_fail();
- return ksft_exit_pass();
+ /* Print at the end to not mix output with child process */
+ ksft_print_header();
+ ksft_set_plan(1);
+ ksft_test_result(!status, "clocksource-switch\n");
+ ksft_exit(!status);
}