Re: [LTP] LTP Containers netns test failure.

Sachin Sant
2010-03-12T05:09:50Z

Garrett Cooper wrote:
> On Wed, Mar 10, 2010 at 6:20 AM, Sachin Sant <sachinp@in.ibm.com> wrote:
>
>> 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.
>>
>
> 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

--

---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------