All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] waitpid/waitpid03: break test if fork failed
@ 2016-04-12 13:22 Han Pingtian
  2016-04-12 15:52 ` Cyril Hrubis
  0 siblings, 1 reply; 8+ messages in thread
From: Han Pingtian @ 2016-04-12 13:22 UTC (permalink / raw)
  To: ltp

If continue after the fork failure, a lot of processes may be killed by
the kill() on line 125.

Signed-off-by: Han Pingtian <hanpt@linux.vnet.ibm.com>
---
 testcases/kernel/syscalls/waitpid/waitpid03.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/waitpid/waitpid03.c b/testcases/kernel/syscalls/waitpid/waitpid03.c
index 2599a92..648870c 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid03.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid03.c
@@ -106,7 +106,8 @@ int main(int argc, char **argv)
 				if (DEBUG)
 					tst_resm(TINFO, "child # %d", ikids);
 			} else if (pid[ikids] == -1) {
-				tst_resm(TFAIL, "cannot open fork #%d", ikids);
+				tst_brkm(TBROK|TERRNO, cleanup,
+					 "cannot open fork #%d", ikids);
 			} else {
 #ifdef UCLINUX
 				if (self_exec(argv[0], "d", ikids) < 0) {
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-04-19 11:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 13:22 [LTP] [PATCH] waitpid/waitpid03: break test if fork failed Han Pingtian
2016-04-12 15:52 ` Cyril Hrubis
2016-04-13  3:29   ` Han Pingtian
2016-04-13 12:51     ` Cyril Hrubis
2016-04-13  6:58   ` Han Pingtian
2016-04-13 12:55     ` Cyril Hrubis
2016-04-14  3:09       ` Han Pingtian
2016-04-19 11:34         ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.