selftests/clone3: Correct log message for waitpid() failures
authorMark Brown <broonie@kernel.org>
Tue, 9 Apr 2024 20:40:32 +0000 (21:40 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 6 May 2024 19:57:20 +0000 (13:57 -0600)
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().

Applied after fixing merge conflict:
Shuah Khan <skhan@linuxfoundation.org>

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/clone3/clone3.c

index 0e0e5dfa97c655dcf4cfbb1e63ba770bf924cb9f..e61f07973ce5e27aff30047b35e03b1b51875c15 100644 (file)
@@ -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 (!WIFEXITED(status)) {