Commit 9de9c4cc authored by Muhammad Usama Anjum's avatar Muhammad Usama Anjum Committed by Catalin Marinas

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: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/r/20240602132502.4186771-1-usama.anjum@collabora.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 963c5d49
...@@ -17,19 +17,21 @@ int main(void) ...@@ -17,19 +17,21 @@ int main(void)
static int tbi_enabled = 0; static int tbi_enabled = 0;
unsigned long tag = 0; unsigned long tag = 0;
struct utsname *ptr; struct utsname *ptr;
int err;
ksft_print_header();
ksft_set_plan(1);
if (prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0) == 0) if (prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0) == 0)
tbi_enabled = 1; tbi_enabled = 1;
ptr = (struct utsname *)malloc(sizeof(*ptr)); ptr = (struct utsname *)malloc(sizeof(*ptr));
if (!ptr) if (!ptr)
ksft_exit_fail_msg("Failed to allocate utsname buffer\n"); ksft_exit_fail_perror("Failed to allocate utsname buffer");
if (tbi_enabled) if (tbi_enabled)
tag = 0x42; tag = 0x42;
ptr = (struct utsname *)SET_TAG(ptr, tag); ptr = (struct utsname *)SET_TAG(ptr, tag);
err = uname(ptr); ksft_test_result(!uname(ptr), "Syscall successful with tagged address\n");
free(ptr); free(ptr);
return err; ksft_finished();
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment