Commit 33c1a778 authored by Mark Brown's avatar Mark Brown Committed by Will Deacon
Browse files

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: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231124-kselftest-arm64-tpidr2-skip-v1-1-e05d0ccef101@kernel.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 2cc14f52
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -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();