Skip to content

Commit 33c1a77

Browse files
brooniewilldeacon
authored andcommitted
kselftest/arm64: Improve output for skipped TPIDR2 ABI test
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 <[email protected]> Link: https://lore.kernel.org/r/20231124-kselftest-arm64-tpidr2-skip-v1-1-e05d0ccef101@kernel.org Signed-off-by: Will Deacon <[email protected]>
1 parent 2cc14f5 commit 33c1a77

File tree

1 file changed

+11
-7
lines changed
  • tools/testing/selftests/arm64/abi

1 file changed

+11
-7
lines changed

tools/testing/selftests/arm64/abi/tpidr2.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@ static int write_clone_read(void)
254254
putnum(++tests_run); \
255255
putstr(" " #name "\n");
256256

257+
#define skip_test(name) \
258+
tests_skipped++; \
259+
putstr("ok "); \
260+
putnum(++tests_run); \
261+
putstr(" # SKIP " #name "\n");
262+
257263
int main(int argc, char **argv)
258264
{
259265
int ret, i;
@@ -283,13 +289,11 @@ int main(int argc, char **argv)
283289
} else {
284290
putstr("# SME support not present\n");
285291

286-
for (i = 0; i < EXPECTED_TESTS; i++) {
287-
putstr("ok ");
288-
putnum(i);
289-
putstr(" skipped, TPIDR2 not supported\n");
290-
}
291-
292-
tests_skipped += EXPECTED_TESTS;
292+
skip_test(default_value);
293+
skip_test(write_read);
294+
skip_test(write_sleep_read);
295+
skip_test(write_fork_read);
296+
skip_test(write_clone_read);
293297
}
294298

295299
print_summary();

0 commit comments

Comments
 (0)