Skip to content

Commit 9de9c4c

Browse files
musamaanjumctmarinas
authored andcommitted
selftests: arm64: tags_test: conform test to TAP output
Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Signed-off-by: Muhammad Usama Anjum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 963c5d4 commit 9de9c4c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tools/testing/selftests/arm64/tags/tags_test.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,21 @@ int main(void)
1717
static int tbi_enabled = 0;
1818
unsigned long tag = 0;
1919
struct utsname *ptr;
20-
int err;
20+
21+
ksft_print_header();
22+
ksft_set_plan(1);
2123

2224
if (prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0) == 0)
2325
tbi_enabled = 1;
2426
ptr = (struct utsname *)malloc(sizeof(*ptr));
2527
if (!ptr)
26-
ksft_exit_fail_msg("Failed to allocate utsname buffer\n");
28+
ksft_exit_fail_perror("Failed to allocate utsname buffer");
2729

2830
if (tbi_enabled)
2931
tag = 0x42;
3032
ptr = (struct utsname *)SET_TAG(ptr, tag);
31-
err = uname(ptr);
33+
ksft_test_result(!uname(ptr), "Syscall successful with tagged address\n");
3234
free(ptr);
3335

34-
return err;
36+
ksft_finished();
3537
}

0 commit comments

Comments
 (0)