summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <usama.anjum@collabora.com>2024-06-02 16:24:59 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2024-07-11 21:00:14 +0300
commit9de9c4cc03add590f99aa5fabbe8f5850e34837c (patch)
tree8b54c534ea547c409ff666794adc11aae00bcd3d /tools/testing
parent963c5d4968220548d013e42e0892b75ca7e790ae (diff)
downloadlinux-9de9c4cc03add590f99aa5fabbe8f5850e34837c.tar.xz
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 <usama.anjum@collabora.com> Link: https://lore.kernel.org/r/20240602132502.4186771-1-usama.anjum@collabora.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/arm64/tags/tags_test.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/testing/selftests/arm64/tags/tags_test.c b/tools/testing/selftests/arm64/tags/tags_test.c
index 955f87c1170d..8ae26e496c89 100644
--- a/tools/testing/selftests/arm64/tags/tags_test.c
+++ b/tools/testing/selftests/arm64/tags/tags_test.c
@@ -17,19 +17,21 @@ int main(void)
static int tbi_enabled = 0;
unsigned long tag = 0;
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)
tbi_enabled = 1;
ptr = (struct utsname *)malloc(sizeof(*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)
tag = 0x42;
ptr = (struct utsname *)SET_TAG(ptr, tag);
- err = uname(ptr);
+ ksft_test_result(!uname(ptr), "Syscall successful with tagged address\n");
free(ptr);
- return err;
+ ksft_finished();
}