The coming patch stack fixes some of the testcases sent earlier on the list by
Veerendra
and adds new testcases for testing network namespace. The patches provides
infrastructure
for tcp testcass and add one testcase for ping command test.
Content-Disposition: inline; filename=fix-libcrt.patch
This patch fixes errors in the library providing function for creating
network namespace container. It also adds support for passing a NULL
instead of an script to this function. This is helpful in case the test
has nothing extra to execute in the parent namespcae.
Signed-off-by: Sudhir Kumar <[EMAIL PROTECTED]>
Index: containers/libclone/libnetns.c
===================================================================
--- containers.orig/libclone/libnetns.c
+++ containers/libclone/libnetns.c
@@ -44,7 +44,7 @@ extern pid_t getsid(pid_t pid);
int crtchild(char *s1 , char *s2)
{
- char *cmd[] = { "/bin/bash", s1, s2, (char *)0 };
+ char *cmd[] = { "--", s1, s2, (char *)0 };
execve("/bin/bash", cmd, __environ);
printf("The code would not reach here on success\n");
perror("execve");
@@ -75,7 +75,13 @@ int create_net_namespace(char *p1, char
par = malloc(len + 70);
child = malloc(len + 70);
- sprintf(par, "%s/testcases/kernel/containers/netns/parentns.sh %s" ,
ltproot, p1);
+ if (p1 == NULL)
+ sprintf(par, "%s/testcases/kernel/containers/netns/parentns.sh" ,
+ ltproot);
+ else
+ sprintf(par, "%s/testcases/kernel/containers/netns/parentns.sh %s" ,
+ ltproot, p1);
+
sprintf(child, "%s/testcases/kernel/containers/netns/childns.sh" ,
ltproot);
if ((pid = fork()) == 0) {
--
Regards
Sudhir Kumar
Linux Technology Center
IBM, India.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list