Thread (16 messages) 16 messages, 2 authors, 2024-06-25
STALE748d

[PATCH v3 5/9] selftests/arm64: Fix build warnings for ptrace

From: Dev Jain <dev.jain@arm.com>
Date: 2024-06-25 12:25:00
Also in: linux-kselftest, lkml
Subsystem: arm64 port (aarch64 architecture), kernel selftest framework, the rest · Maintainers: Catalin Marinas, Will Deacon, Shuah Khan, Linus Torvalds

"%s" should have been used in ksft_exit_fail_msg(). Anyways, replace that
with the recently introduced ksft_exit_fail_perror(). Also fix no mention of
type_name in ksft_test_result_skip().

NOTE: This patch can be applied independently of the series, but the
next patch depends on this one.

Fixes: ecaf4d3f734f ("kselftest/arm64: Add test coverage for NT_ARM_TLS")
Fixes: cb5aa6379438 ("kselftest/arm64: Add a smoke test for ptracing hardware break/watch points")
Signed-off-by: Dev Jain <dev.jain@arm.com>
---
 tools/testing/selftests/arm64/abi/ptrace.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/arm64/abi/ptrace.c b/tools/testing/selftests/arm64/abi/ptrace.c
index abe4d58d731d..c83f0441e9d0 100644
--- a/tools/testing/selftests/arm64/abi/ptrace.c
+++ b/tools/testing/selftests/arm64/abi/ptrace.c
@@ -156,17 +156,17 @@ static void test_hw_debug(pid_t child, int type, const char *type_name)
 		/* Zero is not currently architecturally valid */
 		ksft_test_result(arch, "%s_arch_set\n", type_name);
 	} else {
-		ksft_test_result_skip("%s_arch_set\n");
+		ksft_test_result_skip("%s_arch_set\n", type_name);
 	}
 }
 
 static int do_child(void)
 {
 	if (ptrace(PTRACE_TRACEME, -1, NULL, NULL))
-		ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
+		ksft_exit_fail_perror("PTRACE_TRACEME");
 
 	if (raise(SIGSTOP))
-		ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
+		ksft_exit_fail_perror("raise(SIGSTOP)");
 
 	return EXIT_SUCCESS;
 }
-- 
2.39.2

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help