Skip to content

Commit ce7d101

Browse files
Wolfram Sangshuahkh
authored andcommitted
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>
1 parent 248ae6f commit ce7d101

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tools/testing/selftests/timers/clocksource-switch.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ int main(int argc, char **argv)
183183
out:
184184
change_clocksource(orig_clk);
185185

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);
189191
}

0 commit comments

Comments
 (0)