diff mbox series

kselftest/arm64: Fix build warnings for ptrace

Message ID 20240830052911.4040970-1-dev.jain@arm.com (mailing list archive)
State Accepted
Commit d736d4fc763090f9a02dc5556174de9768093f43
Headers show
Series kselftest/arm64: Fix build warnings for ptrace | expand

Commit Message

Dev Jain Aug. 30, 2024, 5:29 a.m. UTC
A "%s" is missing in ksft_exit_fail_msg(); instead, use the newly
introduced ksft_exit_fail_perror().

Signed-off-by: Dev Jain <dev.jain@arm.com>
---
 tools/testing/selftests/arm64/abi/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Brown Aug. 30, 2024, 11:29 a.m. UTC | #1
On Fri, Aug 30, 2024 at 10:59:11AM +0530, Dev Jain wrote:
> A "%s" is missing in ksft_exit_fail_msg(); instead, use the newly
> introduced ksft_exit_fail_perror().

Reviewed-by: Mark Brown <broonie@kernel.org>
Shuah Khan Aug. 30, 2024, 1:27 p.m. UTC | #2
On 8/29/24 23:29, Dev Jain wrote:
> A "%s" is missing in ksft_exit_fail_msg(); instead, use the newly
> introduced ksft_exit_fail_perror().
> 
> Signed-off-by: Dev Jain <dev.jain@arm.com>
> ---
>   tools/testing/selftests/arm64/abi/ptrace.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/arm64/abi/ptrace.c b/tools/testing/selftests/arm64/abi/ptrace.c
> index e4fa507cbdd0..b51d21f78cf9 100644
> --- a/tools/testing/selftests/arm64/abi/ptrace.c
> +++ b/tools/testing/selftests/arm64/abi/ptrace.c
> @@ -163,10 +163,10 @@ static void test_hw_debug(pid_t child, int type, const char *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;
>   }

Thanks for doing this.

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah
Will Deacon Aug. 30, 2024, 4:12 p.m. UTC | #3
On Fri, 30 Aug 2024 10:59:11 +0530, Dev Jain wrote:
> A "%s" is missing in ksft_exit_fail_msg(); instead, use the newly
> introduced ksft_exit_fail_perror().
> 
> 

Applied to arm64 (for-next/selftests), thanks!

[1/1] kselftest/arm64: Fix build warnings for ptrace
      https://git.kernel.org/arm64/c/d736d4fc7630

Cheers,
diff mbox series

Patch

diff --git a/tools/testing/selftests/arm64/abi/ptrace.c b/tools/testing/selftests/arm64/abi/ptrace.c
index e4fa507cbdd0..b51d21f78cf9 100644
--- a/tools/testing/selftests/arm64/abi/ptrace.c
+++ b/tools/testing/selftests/arm64/abi/ptrace.c
@@ -163,10 +163,10 @@  static void test_hw_debug(pid_t child, int type, const char *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;
 }