Skip to contentSkip to conversation

LTP Containers netns test failure.

LTP Sachin Sant 3 participants 9 messages Mar 10, 2010 – Mar 31, 2010

lore
Share & tools
lore
#0 lore raw

NETNS tests from containers fails to execute with following message

Running netns tests.
--: childns.sh '/opt/ltp': No such file or directory

Looking at the code the problem could be with create_net_namespace() within netns/common.c

If i make the following changes the first subtest works fine but then i ran into other failures related to other sub tests.

@@ -92,7 +92,7 @@ int create_net_namespace(char *p1, char

        }

        /* We need to pass the child pid to the parentns.sh script */

- sprintf(par, "parentns.sh '%s' %s %" PRId32 , ltproot, p1, pid);
+ sprintf(par, "%s/testcases/bin/parentns.sh %s %" PRId32 , ltproot, p1, pid);

        ret = system(par);
        status = WEXITSTATUS(ret);
@@ -141,7 +141,7 @@ int child_fn(void *c1)
                exit(1);
        }

- sprintf(child, "childns.sh '%s'", ltproot);
+ sprintf(child, "%s/testcases/bin/childns.sh", ltproot);

As i don't know the code too much .. i am not sure how to fix it.

Any ideas ?

Thanks
-Sachin

Signature · 18 lines
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 29 lines · Sachin Sant

NETNS tests from containers fails to execute with following message

Running netns tests.
--: childns.sh '/opt/ltp': No such file or directory

Looking at the code the problem could be with create_net_namespace() within netns/common.c

If i make the following changes the first subtest works fine but then i ran into other failures related to other sub tests.

(quoted diff) +1 -1
@@ -92,7 +92,7 @@ int create_net_namespace(char *p1, char
       }
 
       /* We need to pass the child pid to the parentns.sh script */
-       sprintf(par, "parentns.sh '%s' %s %" PRId32 , ltproot, p1, pid);
+       sprintf(par, "%s/testcases/bin/parentns.sh %s %" PRId32 , ltproot,
 p1, pid);
 
       ret = system(par);

      status = WEXITSTATUS(ret);

(quoted diff) +1 -1
@@ -141,7 +141,7 @@ int child_fn(void *c1)
               exit(1);
       }
 
-       sprintf(child, "childns.sh '%s'", ltproot);
+       sprintf(child, "%s/testcases/bin/childns.sh", ltproot);
 
Quoted 1 line

As i don't know the code too much .. i am not sure how to fix it.

export PATH=$PATH:$LTPROOT/testcases/bin ; parentns.sh ?

Why are you overcomplicating things by hardcoding the path again? That's the exact reason why it was removed in the first place...

Thanks,
-Garrett

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
Quoted 31 lines · Garrett Cooper
Quoted 29 lines · Sachin Sant

NETNS tests from containers fails to execute with following message

Running netns tests.
--: childns.sh '/opt/ltp': No such file or directory

Looking at the code the problem could be with create_net_namespace() within netns/common.c

If i make the following changes the first subtest works fine but then i ran into other failures related to other sub tests.

(quoted diff) +1 -1
@@ -92,7 +92,7 @@ int create_net_namespace(char *p1, char
      }
 
      /* We need to pass the child pid to the parentns.sh script */
-       sprintf(par, "parentns.sh '%s' %s %" PRId32 , ltproot, p1, pid);
+       sprintf(par, "%s/testcases/bin/parentns.sh %s %" PRId32 , ltproot,
 p1, pid);
 
      ret = system(par);
      status = WEXITSTATUS(ret);
(quoted diff) +1 -1
@@ -141,7 +141,7 @@ int child_fn(void *c1)
              exit(1);
      }
 
-       sprintf(child, "childns.sh '%s'", ltproot);
+       sprintf(child, "%s/testcases/bin/childns.sh", ltproot);
 
Quoted 8 lines
Quoted 2 lines

As i don't know the code too much .. i am not sure how to fix it.

export PATH=$PATH:$LTPROOT/testcases/bin ; parentns.sh ?

Why are you overcomplicating things by hardcoding the path again? That's the exact reason why it was removed in the first place...

Hmm .. i am still not able to execute the test even after exporting the PATH.

lp5:/opt/ltp # export LTPROOT=/opt/ltp lp5:/opt/ltp # export PATH=$PATH:$LTPROOT/testcases/bin lp5:/opt/ltp # ./runltp -f containers
........<SNIP>..........
<<<test_start>>>
tag=Containers stime=1268369850 cmdline="container_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
Running netns tests.
--: childns.sh '/opt/ltp': No such file or directory

I feel the problem is: the code is searching childns.sh in LTPROOT directory instead of LTPROOT/testcases/bin

Thanks
-Sachin

Signature · 18 lines
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#3 lore raw
Quoted 61 lines · Sachin Sant
Quoted 34 lines · Garrett Cooper
Quoted 31 lines · Sachin Sant

NETNS tests from containers fails to execute with following message

Running netns tests.
--: childns.sh '/opt/ltp': No such file or directory

Looking at the code the problem could be with create_net_namespace() within netns/common.c

If i make the following changes the first subtest works fine but then i ran into other failures related to other sub tests.

(quoted diff) +1 -1
@@ -92,7 +92,7 @@ int create_net_namespace(char *p1, char
      }
 
      /* We need to pass the child pid to the parentns.sh script */
-       sprintf(par, "parentns.sh '%s' %s %" PRId32 , ltproot, p1, pid);
+       sprintf(par, "%s/testcases/bin/parentns.sh %s %" PRId32 ,
 ltproot,
 p1, pid);
 

     ret = system(par);
     status = WEXITSTATUS(ret);

(quoted diff) +1 -1
@@ -141,7 +141,7 @@ int child_fn(void *c1)
              exit(1);
      }
 
-       sprintf(child, "childns.sh '%s'", ltproot);
+       sprintf(child, "%s/testcases/bin/childns.sh", ltproot);
 
Quoted 8 lines
Quoted 2 lines

As i don't know the code too much .. i am not sure how to fix it.

export PATH=$PATH:$LTPROOT/testcases/bin ; parentns.sh ?

Why are you overcomplicating things by hardcoding the path again? That's the exact reason why it was removed in the first place...

Hmm .. i am still not able to execute the test even after exporting the PATH.

lp5:/opt/ltp # export LTPROOT=/opt/ltp lp5:/opt/ltp # export PATH=$PATH:$LTPROOT/testcases/bin lp5:/opt/ltp # ./runltp -f containers ........<SNIP>..........
<<<test_start>>>
tag=Containers stime=1268369850 cmdline="container_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
Running netns tests.
--: childns.sh '/opt/ltp': No such file or directory

Quoted 2 lines

I feel the problem is: the code is searching childns.sh in LTPROOT directory instead of LTPROOT/testcases/bin

Please test your claim by calling env in the script -- what happens? Something doesn't necessarily add up with the claim.
Thanks,
-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 17 lines · Garrett Cooper
Quoted 17 lines

Hmm .. i am still not able to execute the test even after exporting the PATH.

lp5:/opt/ltp # export LTPROOT=/opt/ltp lp5:/opt/ltp # export PATH=$PATH:$LTPROOT/testcases/bin lp5:/opt/ltp # ./runltp -f containers ........<SNIP>..........
<<<test_start>>>
tag=Containers stime=1268369850 cmdline="container_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
Running netns tests.
--: childns.sh '/opt/ltp': No such file or directory

Quoted 7 lines
Quoted 3 lines

I feel the problem is: the code is searching childns.sh in LTPROOT directory instead of LTPROOT/testcases/bin

Please test your claim by calling env in the script -- what happens? Something doesn't necessarily add up with the claim.

You meant calling env from childns.sh or some other script ?

I printed env o/p (just before calling netns tests) from container_test.sh

contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
--- Start env o/p ---
LESSKEY=/etc/lesskey.bin
NNTPSERVER=news
.... SNIP ...
MAIL=/var/mail/root PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/ltp/testcases/bin:/opt/ltp/testcases/bin CPU=ppc64
_=/usr/bin/env
SSH_SENDS_LOCALE=yes
INPUTRC=/etc/inputrc
PWD=/opt/ltp/testcases/bin
LANG=en_US.UTF-8
PYTHONSTARTUP=/etc/pythonstart
LTPROOT=/opt/ltp
.... SNIP ...

So the values look okay, but the run still fails.

Thanks
-Sachin

Signature · 18 lines
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#5 lore raw
Quoted 51 lines · Sachin Sant
Quoted 18 lines · Garrett Cooper
Quoted 18 lines

Hmm .. i am still not able to execute the test even after exporting the PATH.

lp5:/opt/ltp # export LTPROOT=/opt/ltp lp5:/opt/ltp # export PATH=$PATH:$LTPROOT/testcases/bin lp5:/opt/ltp # ./runltp -f containers ........<SNIP>..........
<<<test_start>>>
tag=Containers stime=1268369850 cmdline="container_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
Running netns tests.
--: childns.sh '/opt/ltp': No such file or directory

Quoted 7 lines
Quoted 3 lines

I feel the problem is: the code is searching childns.sh in LTPROOT directory instead of LTPROOT/testcases/bin

   Please test your claim by calling env in the script -- what happens? Something doesn't necessarily add up with the claim.

You meant calling env from childns.sh or some other script ?

I printed env o/p (just before calling netns tests) from container_test.sh

contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
--- Start env o/p ---
LESSKEY=/etc/lesskey.bin
NNTPSERVER=news
.... SNIP ...
MAIL=/var/mail/root PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/ltp/testcases/bin:/opt/ltp/testcases/bin CPU=ppc64
_=/usr/bin/env
SSH_SENDS_LOCALE=yes
INPUTRC=/etc/inputrc
PWD=/opt/ltp/testcases/bin
LANG=en_US.UTF-8
PYTHONSTARTUP=/etc/pythonstart
LTPROOT=/opt/ltp
.... SNIP ...

Quoted 1 line

So the values look okay, but the run still fails.

Could you also add a check within childns.sh please?
Thanks,
-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#6 lore raw
Quoted 20 lines · Garrett Cooper
Quoted 20 lines

contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
--- Start env o/p ---
LESSKEY=/etc/lesskey.bin
NNTPSERVER=news
.... SNIP ...
MAIL=/var/mail/root PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/ltp/testcases/bin:/opt/ltp/testcases/bin CPU=ppc64
_=/usr/bin/env
SSH_SENDS_LOCALE=yes
INPUTRC=/etc/inputrc
PWD=/opt/ltp/testcases/bin
LANG=en_US.UTF-8
PYTHONSTARTUP=/etc/pythonstart
LTPROOT=/opt/ltp
.... SNIP ...

Quoted 5 lines
Quoted 2 lines

So the values look okay, but the run still fails.

Could you also add a check within childns.sh please?

As the LTP framework is unable to locate childns.sh script(as per the error message) i cannot print anything from within childns.sh. This script is never invoked during the run.

Thanks
-Sachin

Quoted 4 lines

Thanks,
-Garrett

Signature · 18 lines
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#7 lore raw
Quoted 21 lines · Sachin Sant
Quoted 20 lines · Garrett Cooper
Quoted 20 lines

contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
--- Start env o/p ---
LESSKEY=/etc/lesskey.bin
NNTPSERVER=news
.... SNIP ...
MAIL=/var/mail/root PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/ltp/testcases/bin:/opt/ltp/testcases/bin CPU=ppc64
_=/usr/bin/env
SSH_SENDS_LOCALE=yes
INPUTRC=/etc/inputrc
PWD=/opt/ltp/testcases/bin
LANG=en_US.UTF-8
PYTHONSTARTUP=/etc/pythonstart
LTPROOT=/opt/ltp
.... SNIP ...

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

So the values look okay, but the run still fails.

Could you also add a check within childns.sh please?

As the LTP framework is unable to locate childns.sh script(as per the error message) i cannot print anything from within childns.sh. This script is never invoked during the run.

Can we think on any alternate solution for this ?

-Rishi

Quoted 30 lines

Thanks
-Sachin

Quoted 4 lines

Thanks,
-Garrett

Signature · 18 lines
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Signature · 16 lines
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#8 lore raw
Quoted 25 lines · Rishikesh K Rajak
Quoted 24 lines · Sachin Sant
Quoted 23 lines · Garrett Cooper
Quoted 22 lines

contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
--- Start env o/p ---
LESSKEY=/etc/lesskey.bin
NNTPSERVER=news
.... SNIP ...
MAIL=/var/mail/root PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/ltp/testcases/bin:/opt/ltp/testcases/bin CPU=ppc64
_=/usr/bin/env
SSH_SENDS_LOCALE=yes
INPUTRC=/etc/inputrc
PWD=/opt/ltp/testcases/bin
LANG=en_US.UTF-8
PYTHONSTARTUP=/etc/pythonstart
LTPROOT=/opt/ltp
.... SNIP ...

So the values look okay, but the run still fails.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

    Could you also add a check within childns.sh please?

As the LTP framework is unable to locate childns.sh script(as per the error message) i cannot print anything from within childns.sh. This script is never invoked during the run.

Can we think on any alternate solution for this ?

I haven't really dug into this issue; honestly, I would just
commit the fix that Sachin provided which reverted the testcases/bin removal that I did a few months back. However, I would also add a comment stating why the hardcoded relative path is required with this test and point to this post, so someone doesn't make the same mistake in the future.
Thanks,
-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list