[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220713204623.5443-10-wsa+renesas@sang-engineering.com>
Date: Wed, 13 Jul 2022 22:46:21 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: linux-renesas-soc@...r.kernel.org
Cc: John Stultz <jstultz@...gle.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>, Shuah Khan <shuah@...nel.org>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: [PATCH 9/9] 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@...g-engineering.com>
---
tools/testing/selftests/timers/clocksource-switch.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/timers/clocksource-switch.c b/tools/testing/selftests/timers/clocksource-switch.c
index a1d0d33738b6..e2c0e4485ea8 100644
--- a/tools/testing/selftests/timers/clocksource-switch.c
+++ b/tools/testing/selftests/timers/clocksource-switch.c
@@ -182,7 +182,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);
}
--
2.35.1
Powered by blists - more mailing lists