[CRIU] [PATCH] parasite-syscall: print an error message only in error cases
Andrey Vagin
avagin at openvz.org
Wed Nov 18 07:52:32 PST 2015
From: Andrew Vagin <avagin at virtuozzo.com>
This patch suppresses these fake errors:
./socket-tcp6-local --pidfile=socket-tcp6-local.pid --outfile=socket-tcp6-local.out
Dump 5921
(00.041988) Error (parasite-syscall.c:388): si_code=1 si_pid=5936 si_status=0
(00.051210) Error (parasite-syscall.c:388): si_code=1 si_pid=5937 si_status=0
(00.070800) Error (parasite-syscall.c:388): si_code=1 si_pid=5938 si_status=0
(00.077582) Error (parasite-syscall.c:388): si_code=1 si_pid=5939 si_status=0
(00.091313) Error (action-scripts.c:59): One of more action scripts failed
Check results 5921
18:39:14.451: 5921: PASS
Test: zdtm/live/static/socket-tcp6-local, Result: PASS
ZDTM tests PASS.
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
parasite-syscall.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/parasite-syscall.c b/parasite-syscall.c
index ee339db..bcd9922 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -384,13 +384,13 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
{
int pid, status;
- pr_err("si_code=%d si_pid=%d si_status=%d\n",
- siginfo->si_code, siginfo->si_pid, siginfo->si_status);
-
pid = waitpid(-1, &status, WNOHANG);
if (pid <= 0)
return;
+ pr_err("si_code=%d si_pid=%d si_status=%d\n",
+ siginfo->si_code, siginfo->si_pid, siginfo->si_status);
+
if (WIFEXITED(status))
pr_err("%d exited with %d unexpectedly\n", pid, WEXITSTATUS(status));
else if (WIFSIGNALED(status))
--
2.4.3
More information about the CRIU
mailing list