Skip to content

Commit

Permalink
selftests: timers: clocksource-switch: adapt to kselftest framework
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wolfram Sang authored and Shuah Khan committed Jul 14, 2022
1 parent 248ae6f commit ce7d101
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/testing/selftests/timers/clocksource-switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit ce7d101

Please sign in to comment.