diff mbox series

selftests/clone3: Correct log message for waitpid() failures

Message ID 20240409-kselftest-clone3-waitpid-v1-1-2b31e4aaac16@kernel.org
State New
Headers show
Series selftests/clone3: Correct log message for waitpid() failures | expand

Commit Message

Mark Brown April 9, 2024, 8:40 p.m. UTC
When logging an error from calling waitpid() on the child we print a
misleading error message saying that the error we report was returned by
the chilld. Fix this to say the error is from waitpid().

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/clone3/clone3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 8cb4a9a82b21623dbb4b3051dd30d98356cf95bc
change-id: 20240405-kselftest-clone3-waitpid-68c4833cf5ff

Best regards,

Comments

Shuah Khan April 11, 2024, 9:03 p.m. UTC | #1
On 4/9/24 14:40, Mark Brown wrote:
> When logging an error from calling waitpid() on the child we print a
> misleading error message saying that the error we report was returned by
> the chilld. Fix this to say the error is from waitpid().
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>   tools/testing/selftests/clone3/clone3.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c
> index 3c9bf0cd82a8..eb108727c35c 100644
> --- a/tools/testing/selftests/clone3/clone3.c
> +++ b/tools/testing/selftests/clone3/clone3.c
> @@ -95,7 +95,7 @@ static int call_clone3(uint64_t flags, size_t size, enum test_mode test_mode)
>   			getpid(), pid);
>   
>   	if (waitpid(-1, &status, __WALL) < 0) {
> -		ksft_print_msg("Child returned %s\n", strerror(errno));
> +		ksft_print_msg("waitpid() returned %s\n", strerror(errno));
>   		return -errno;
>   	}
>   	if (WEXITSTATUS(status))
> 
> ---
> base-commit: 8cb4a9a82b21623dbb4b3051dd30d98356cf95bc
> change-id: 20240405-kselftest-clone3-waitpid-68c4833cf5ff
> 
> Best regards,

Applied to linux-kselftest next for Linux 6.10-rc1.

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c
index 3c9bf0cd82a8..eb108727c35c 100644
--- a/tools/testing/selftests/clone3/clone3.c
+++ b/tools/testing/selftests/clone3/clone3.c
@@ -95,7 +95,7 @@  static int call_clone3(uint64_t flags, size_t size, enum test_mode test_mode)
 			getpid(), pid);
 
 	if (waitpid(-1, &status, __WALL) < 0) {
-		ksft_print_msg("Child returned %s\n", strerror(errno));
+		ksft_print_msg("waitpid() returned %s\n", strerror(errno));
 		return -errno;
 	}
 	if (WEXITSTATUS(status))