Skip to content

Commit bf52ca5

Browse files
Andre-ARMctmarinas
authored andcommitted
kselftest/arm64: mte: use proper SKIP syntax
If MTE is not available on a system, we detect this early and skip all the MTE selftests. However this happens before we print the TAP plan, so tools parsing the TAP output get confused and report an error. Use the existing ksft_exit_skip() function to handle this, which uses a dummy plan to work with tools expecting proper TAP syntax, as described in the TAP specification. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent b0d80db commit bf52ca5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tools/testing/selftests/arm64/mte/mte_common_util.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,9 @@ int mte_default_setup(void)
319319
unsigned long en = 0;
320320
int ret;
321321

322-
if (!(hwcaps2 & HWCAP2_MTE)) {
323-
ksft_print_msg("SKIP: MTE features unavailable\n");
324-
return KSFT_SKIP;
325-
}
322+
if (!(hwcaps2 & HWCAP2_MTE))
323+
ksft_exit_skip("MTE features unavailable\n");
324+
326325
/* Get current mte mode */
327326
ret = prctl(PR_GET_TAGGED_ADDR_CTRL, en, 0, 0, 0);
328327
if (ret < 0) {

0 commit comments

Comments
 (0)