From: Rishi k. K R. <ris...@li...> - 2010-04-29 13:38:17
|
The branch, next, has been updated via a281aa71cbe8bf8ed9e75d8f3da85ab3bf44d021 (commit) from 4e08cd4291e660558504841323f0ac9869628327 (commit) - Log ----------------------------------------------------------------- commit a281aa71cbe8bf8ed9e75d8f3da85ab3bf44d021 Author: Rishikesh K Rajak <ris...@li...> Date: Thu Apr 29 19:05:59 2010 +0530 The child spawned by mqns04.c terminates by calling tst_exit(). tst_exit() basically calls exit(0). In the case where the child was spawned with fork+unshare that's fine, but in the case where it was spawned by clone() it is not: it causes the parent to see the exit status as 4, as in: posixmq_namespace_04 1 TFAIL : Child did not exit normally (status 4) This patch simply makes the child do _exit(0) on success, and that works fine. I wonder if there is some way we can generically do the right thing at txt_exit()? Note that other tests have the same problem: pid_namespace1 0 TWARN : child exited with signal 4 pid_namespace4 2 TFAIL : Container init pid got killed by signal 4 pidns20 1 TBROK : parent: cinit is terminated by 4 Should we just do this same "fix" in those testcases? Signed-off-by: Serge Hallyn <se...@us...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/containers/mqns/mqns_04.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/containers/mqns/mqns_04.c b/testcases/kernel/containers/mqns/mqns_04.c index 8a4a9c2..f6e3f51 100644 --- a/testcases/kernel/containers/mqns/mqns_04.c +++ b/testcases/kernel/containers/mqns/mqns_04.c @@ -78,6 +78,7 @@ int check_mqueue(void *vtest) write(p2[1], "go", 3); read(p1[0], buf, 3); + _exit(0); tst_exit(); } hooks/post-receive -- ltp |