* [PATCH] kselftest/arm64: Improve output for skipped TPIDR2 ABI test
@ 2023-11-24 15:22 Mark Brown
2023-12-11 20:27 ` Will Deacon
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2023-11-24 15:22 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Shuah Khan
Cc: linux-arm-kernel, linux-kselftest, linux-kernel, Mark Brown
When TPIDR2 is not supported the tpidr2 ABI test prints the same message
for each skipped test:
ok 1 skipped, TPIDR2 not supported
which isn't ideal for test automation software since it tracks kselftest
results based on the string used to describe the test. This is also not
standard KTAP output, the expected format is:
ok 1 # SKIP default_value
Updated the program to generate this, using the same set of test names that
we would run if the test actually executed.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
tools/testing/selftests/arm64/abi/tpidr2.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/arm64/abi/tpidr2.c b/tools/testing/selftests/arm64/abi/tpidr2.c
index 351a098b503a..02ee3a91b780 100644
--- a/tools/testing/selftests/arm64/abi/tpidr2.c
+++ b/tools/testing/selftests/arm64/abi/tpidr2.c
@@ -254,6 +254,12 @@ static int write_clone_read(void)
putnum(++tests_run); \
putstr(" " #name "\n");
+#define skip_test(name) \
+ tests_skipped++; \
+ putstr("ok "); \
+ putnum(++tests_run); \
+ putstr(" # SKIP " #name "\n");
+
int main(int argc, char **argv)
{
int ret, i;
@@ -283,13 +289,11 @@ int main(int argc, char **argv)
} else {
putstr("# SME support not present\n");
- for (i = 0; i < EXPECTED_TESTS; i++) {
- putstr("ok ");
- putnum(i);
- putstr(" skipped, TPIDR2 not supported\n");
- }
-
- tests_skipped += EXPECTED_TESTS;
+ skip_test(default_value);
+ skip_test(write_read);
+ skip_test(write_sleep_read);
+ skip_test(write_fork_read);
+ skip_test(write_clone_read);
}
print_summary();
---
base-commit: 98b1cc82c4affc16f5598d4fa14b1858671b2263
change-id: 20231124-kselftest-arm64-tpidr2-skip-43764f4ff4f4
Best regards,
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] kselftest/arm64: Improve output for skipped TPIDR2 ABI test
2023-11-24 15:22 [PATCH] kselftest/arm64: Improve output for skipped TPIDR2 ABI test Mark Brown
@ 2023-12-11 20:27 ` Will Deacon
0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2023-12-11 20:27 UTC (permalink / raw)
To: Catalin Marinas, Shuah Khan, Mark Brown
Cc: kernel-team, Will Deacon, linux-arm-kernel, linux-kernel,
linux-kselftest
On Fri, 24 Nov 2023 15:22:21 +0000, Mark Brown wrote:
> When TPIDR2 is not supported the tpidr2 ABI test prints the same message
> for each skipped test:
>
> ok 1 skipped, TPIDR2 not supported
>
> which isn't ideal for test automation software since it tracks kselftest
> results based on the string used to describe the test. This is also not
> standard KTAP output, the expected format is:
>
> [...]
Applied to arm64 (for-next/selftests), thanks!
[1/1] kselftest/arm64: Improve output for skipped TPIDR2 ABI test
https://git.kernel.org/arm64/c/33c1a7785a41
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-11 20:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-24 15:22 [PATCH] kselftest/arm64: Improve output for skipped TPIDR2 ABI test Mark Brown
2023-12-11 20:27 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®