Murlin Wenzel said the following on 2011-3-16 3:09:
>> diff --git a/testcases/kernel/containers/pidns/pidns05.c 
>> b/testcases/kernel/containers/pidns/pidns05.c
>> index 8a08dce..9ffc946 100644
>> --- a/testcases/kernel/containers/pidns/pidns05.c
>> +++ b/testcases/kernel/containers/pidns/pidns05.c
>> @@ -186,13 +186,8 @@ void kill_nested_containers()
>>  
>>      /* Loops through the containers created to exit from sleep() */
>>      for (i = 0; i < MAX_DEPTH; i++) {
>> -            if (waitpid(pids[i], &status, 0) == -1)
>> -                    tst_resm(TFAIL|TERRNO, "waitpid(%d, ...) failed",
>> -                        pids[i]);
>> -            else {
>> -                    kill(pids[i], SIGKILL);
>> -                    waitpid(pids[i], &status, 0);
>> -            }
>> +            kill(pids[i], SIGKILL);
>> +            waitpid(pids[i], &status, 0);
>>      }
>>  }
>>  
>> @@ -222,7 +217,10 @@ int main(int argc, char *argv[])
>>              if (waitpid(pid, &status, 0) == -1) {
>>                      perror("wait failed");
>>              }
>> -            exit(status);
>> +            if (WIFEXITED(status))
>> +                    exit(WEXITSTATUS(status));
>> +            else
>> +                    exit(status);
>>      }
>>  
>>      /* To make all the containers share the same PGID as its parent */
>> @@ -255,4 +253,4 @@ int main(int argc, char *argv[])
>>      cleanup();
>>  
>>      tst_exit();
>> -}
>> \ No newline at end of file
>> +}
> 
> 
> I applied this patch to 20110228 release and the 'containers' test now runs 
> without hanging.  There are several 'TBROK' and 'TFAIL' errors, but at least 
> the test runs to completion now.
> 

When executing the case after applied this patch, the log is as following:

pidns05     0  TINFO  :   5 Nested Containers are created
pidns05     1  TPASS  :  The number of containers killed are 2

Would you share your test log?

-- 
Best Regards,
Peng Haitao


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to