public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] containers/netns:parameters are not correct when calling crtchild() function
@ 2014-04-15  9:02 shuang.qiu
  2014-04-15 10:15 ` chrubis
  0 siblings, 1 reply; 2+ messages in thread
From: shuang.qiu @ 2014-04-15  9:02 UTC (permalink / raw)
  To: ltp-list

From: Shuang Qiu <shuang.qiu@oracle.com>

The numbers of parameters for crtchild() function which called in
two_children_ns.c and par_chld_ipv6.c is not correct.And it will make
the child process to be a zombie process.

Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
---
 testcases/kernel/containers/netns/par_chld_ipv6.c  |    4 ++--
 .../kernel/containers/netns/two_children_ns.c      |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/testcases/kernel/containers/netns/par_chld_ipv6.c b/testcases/kernel/containers/netns/par_chld_ipv6.c
index f0d17ba..68c671f 100644
--- a/testcases/kernel/containers/netns/par_chld_ipv6.c
+++ b/testcases/kernel/containers/netns/par_chld_ipv6.c
@@ -45,7 +45,7 @@
 #include "test.h"
 #include "config.h"
 
-extern int crtchild(char *);
+extern int crtchild(char *, char *);
 
 char *TCID = "netns_ipv6";
 int TST_TOTAL = 1;
@@ -95,7 +95,7 @@ int main()
 #else
 		tst_resm(TCONF, "System doesn't have unshare support");
 #endif
-		return crtchild(child);
+		return crtchild(child, NULL);
 	} else {
 
 		//parent
diff --git a/testcases/kernel/containers/netns/two_children_ns.c b/testcases/kernel/containers/netns/two_children_ns.c
index 235d9c4..4d7808c 100644
--- a/testcases/kernel/containers/netns/two_children_ns.c
+++ b/testcases/kernel/containers/netns/two_children_ns.c
@@ -47,7 +47,7 @@
 #include "libclone.h"
 #include "config.h"
 
-extern int crtchild(char *);
+extern int crtchild(char *, char *);
 
 char *TCID = "netns_2children";
 int TST_TOTAL = 1;
@@ -109,7 +109,7 @@ int main()
 				return ret;
 			}
 #endif
-			return crtchild(child[i]);
+			return crtchild(child[i], NULL);
 		} else {
 			//Parent
 
-- 
1.7.7


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] containers/netns:parameters are not correct when calling crtchild() function
  2014-04-15  9:02 [LTP] [PATCH] containers/netns:parameters are not correct when calling crtchild() function shuang.qiu
@ 2014-04-15 10:15 ` chrubis
  0 siblings, 0 replies; 2+ messages in thread
From: chrubis @ 2014-04-15 10:15 UTC (permalink / raw)
  To: shuang.qiu; +Cc: ltp-list

Hi!
> The numbers of parameters for crtchild() function which called in
> two_children_ns.c and par_chld_ipv6.c is not correct.And it will make
> the child process to be a zombie process.

Can you please create proper header file (common.h) and move the
function prototype there and include it in both common.c and the tests
that use it?

Because otherwise the code may break again if sommebody forgets to
change all occurences.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2014-04-15 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-15  9:02 [LTP] [PATCH] containers/netns:parameters are not correct when calling crtchild() function shuang.qiu
2014-04-15 10:15 ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox