mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 12:10:38 -04:00
selftest: pidfd: Omit long and repeating outputs
An output message: > # # waitpid WEXITSTATUS=0 will be printed for 30,000+ times in the `pidfd_test` selftest, which does not seem ideal. This patch removes the print logic in the `wait_for_pid` function, so each call to this function does not output a line by default. Any existing call sites where the extra line might be beneficial have been modified to include extra print statements outside of the function calls. Signed-off-by: Ziqi Zhao <astrajoan@yahoo.com> Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
@@ -90,7 +90,6 @@ static inline int wait_for_pid(pid_t pid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = WEXITSTATUS(status);
|
ret = WEXITSTATUS(status);
|
||||||
ksft_print_msg("waitpid WEXITSTATUS=%d\n", ret);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ static inline int child_join(struct child *child, struct error *err)
|
|||||||
r = -1;
|
r = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ksft_print_msg("waitpid WEXITSTATUS=%d\n", r);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,8 @@ static int test_pidfd_send_signal_exited_fail(void)
|
|||||||
|
|
||||||
pidfd = open(buf, O_DIRECTORY | O_CLOEXEC);
|
pidfd = open(buf, O_DIRECTORY | O_CLOEXEC);
|
||||||
|
|
||||||
(void)wait_for_pid(pid);
|
ret = wait_for_pid(pid);
|
||||||
|
ksft_print_msg("waitpid WEXITSTATUS=%d\n", ret);
|
||||||
|
|
||||||
if (pidfd < 0)
|
if (pidfd < 0)
|
||||||
ksft_exit_fail_msg(
|
ksft_exit_fail_msg(
|
||||||
|
|||||||
Reference in New Issue
Block a user