Message ID | 20240625122408.1439097-6-dev.jain@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | A new selftests/ directory for arm compatibility testing | expand |
On Tue, Jun 25, 2024 at 05:54:04PM +0530, Dev Jain wrote: > "%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(). Reviewed-by: Mark Brown <broonie@kernel.org> but a couple of minor notes if this needs resending (it might be best to send indpendently as well to help it get picked up more quickly.) > NOTE: This patch can be applied independently of the series, but the > next patch depends on this one. Admin notes like this should go after the ---. > 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)"); This should ideally be a separate patch, there's no overlap.
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; }
"%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(-)