Quoting Sudhir Kumar (sku...@linux.vnet.ibm.com): > This patch fixes some of the errors that I found in network namespace creation > library. > > A file test on an unset vriable will give a pass, so the current test fails. > (var scrpt may not have been set before calling :))This patch fixes that > error. > > Signed-off-by: Sudhir Kumar <sku...@linux.vnet.ibm.com>
Ok I'll give this Acked-by: Serge Hallyn <se...@us.ibm.com> However, the first hunk seems unnecessary and slightly-wrong, unless you will later be changing the way crtchild is called. The first member of argv should repeat the command name, and it is what will show up as the running command if you do ps -ef. So after this patch, the process execve()d by crtchild will show up as being "--" (in ps -ef or in /proc/<pid>/cmdline). > Index: ltp-full-20081130/testcases/kernel/containers/libclone/libnetns.c > =================================================================== > --- ltp-full-20081130.orig/testcases/kernel/containers/libclone/libnetns.c > +++ ltp-full-20081130/testcases/kernel/containers/libclone/libnetns.c > @@ -47,7 +47,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"); > Index: ltp-full-20081130/testcases/kernel/containers/netns/parentns.sh > =================================================================== > --- ltp-full-20081130.orig/testcases/kernel/containers/netns/parentns.sh > +++ ltp-full-20081130/testcases/kernel/containers/netns/parentns.sh > @@ -77,7 +77,7 @@ status=0 > echo $vnet1 > /tmp/FIFO2 > > # Executes the script if it is passed as an argument. > - if [ -f $scrpt ] ; then > + if [ ! -z $scrpt ] && [ -f $scrpt ] ; then > . $scrpt > fi > > ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list