clone01 -c 10 on x86
Hi All,
can you please to run clone01 syscall test on any x86 machine? I am getting fault there when I run it 10 times for example. The same problem I have on Microblaze.
./clone01 -c 10 clone01 1 TPASS : clone() returned 22738 clone01 1 TPASS : clone() returned 22740 clone01 1 TPASS : clone() returned 22742 clone01 1 TPASS : clone() returned 22748 clone01 1 TPASS : clone() returned 22750 clone01 1 TPASS : clone() returned 22752 clone01 1 TPASS : clone() returned 22754 clone01 1 TFAIL : clone() returned 134919589, errno = 22755
[monstr@monstr clone]$ clone01 1 TPASS : clone() returned 22744
clone01 1 TPASS : clone() returned 22746
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng) PetaLogix - Linux Solutions for a Reconfigurable World w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 15 lines · Michal Simek
Hi All,
can you please to run clone01 syscall test on any x86 machine? I am getting fault there when I run it 10 times for example. The same problem I have on Microblaze.
./clone01 -c 10 clone01 1 TPASS : clone() returned 22738 clone01 1 TPASS : clone() returned 22740 clone01 1 TPASS : clone() returned 22742 clone01 1 TPASS : clone() returned 22748 clone01 1 TPASS : clone() returned 22750 clone01 1 TPASS : clone() returned 22752 clone01 1 TPASS : clone() returned 22754 clone01 1 TFAIL : clone() returned 134919589, errno = 22755
Quoted 5 lines
[monstr@monstr clone]$ clone01 1 TPASS :
clone()returned 22744
clone01 1 TPASS :clone()returned 22746Thanks,
Michal
All right I don't have the patiente to wade through the parse_opts and usc_lib crap, but this is not a clone failure. What appears to be happening is setup() at the top of clone01.c is calling lib/parse_opts.c:usc_global_setup_hook(), with STD_COPIES set to the count option you passed in. That forks of 10 copies of the test. I don't know what happens with the actual loop then, but the reason you get the error for the last clone test is that one of those forked copies of clone01 (*not* one of the cloned children) exits, and wait() catches that one. That is why wait() returned 22744, which isn't any of the cloned children.
So one stupid way of fixing this without dealing with the convoluted setup junk would be to change the waitpid chunk of the code like so:
usr/src/ltp-intermediate-20090721.patched/testcases/kernel/syscalls/clone/clone01.c renamed from usr/src/ltp-intermediate-20090721/testcases/kernel/syscalls/clone/clone01.c +5 -4
@@ -130,6 +132,7 @@ int main(int ac, char **av) (do_child, child_stack + CHILD_STACK_SIZE, SIGCHLD, NULL));#endif +again:if ((child_pid =wait (&status)) ==-1 ) {tst_brkm (TBROK , cleanup,"wait() failed; error no =" " %d, %s" , errno,strerror (errno));
@@ -138,11 +141,11 @@ int main(int ac, char **av)/* check return code */ if (TEST_RETURN == child_pid) {tst_resm (TPASS ,"clone() returned %d" ,TEST_RETURN ); - }else { -tst_resm (TFAIL ,"clone() returned %d, errno = %d " , -"wait() returned %d" ,TEST_RETURN ,TEST_ERRNO , + }else if (TEST_RETURN ==-1 ) { +tst_resm (TFAIL ,"clone() returned %d, errno = %d wait() returned %d\n" ,TEST_RETURN ,TEST_ERRNO , child_pid); - } + }else + goto again; }/* End for TEST_LOOPING */
-serge
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 33 lines · Serge E. Hallyn
Quoted 15 lines · Michal Simek
Hi All,
can you please to run clone01 syscall test on any x86 machine? I am getting fault there when I run it 10 times for example. The same problem I have on Microblaze.
./clone01 -c 10 clone01 1 TPASS : clone() returned 22738 clone01 1 TPASS : clone() returned 22740 clone01 1 TPASS : clone() returned 22742 clone01 1 TPASS : clone() returned 22748 clone01 1 TPASS : clone() returned 22750 clone01 1 TPASS : clone() returned 22752 clone01 1 TPASS : clone() returned 22754 clone01 1 TFAIL : clone() returned 134919589, errno = 22755Quoted 5 lines
[monstr@monstr clone]$ clone01 1 TPASS :
clone()returned 22744
clone01 1 TPASS :clone()returned 22746Thanks,
MichalAll right I don't have the patiente to wade through the
parse_optsandusc_libcrap, but this is not a clone failure. What appears to be happening issetup()at the top ofclone01.cis calling lib/parse_opts.c:usc_global_setup_hook(), withSTD_COPIESset to the count option you passed in. That forks of 10 copies of the test. I don't know what happens with the actual loop then, but the reason you get the error for the last clone test is that one of those forked copies of clone01 (*not* one of the cloned children) exits, andwait()catches that one. That is whywait()returned 22744, which isn't any of the cloned children.
Quoted 2 lines
So one stupid way of fixing this without dealing with the convoluted setup junk would be to change the waitpid chunk of the code like so:
Yes, it fixes the issue.
Regards--
Subrata
Quoted 32 lines
usr/src/ltp-intermediate-20090721.patched/testcases/kernel/syscalls/clone/clone01.c renamed from usr/src/ltp-intermediate-20090721/testcases/kernel/syscalls/clone/clone01.c +5
-6@@ -130,6 +132,7 @@ int main(int ac, char **av) (do_child, child_stack + CHILD_STACK_SIZE, SIGCHLD, NULL));#endif +again:if ((child_pid =wait (&status)) ==-1 ) {tst_brkm (TBROK , cleanup,"wait() failed; error no =" " %d, %s" , errno,strerror (errno));@@ -138,11 +141,11 @@ int main(int ac, char **av)/* check return code */ if (TEST_RETURN == child_pid) {tst_resm (TPASS ,"clone() returned %d" ,TEST_RETURN ); - }else { -tst_resm (TFAIL ,"clone() returned %d, errno = %d " , -"wait() returned %d" ,TEST_RETURN ,TEST_ERRNO , + }else if (TEST_RETURN ==-1 ) { +tst_resm (TFAIL ,"clone() returned %d, errno = %d wait() returned %d\n" ,TEST_RETURN ,TEST_ERRNO , child_pid); - } + }else + goto again; }/* End for TEST_LOOPING */ -serge ------------------------------------------------------------------------------
Quoted 8 lines
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 36 lines · Subrata Modak
Quoted 34 lines · Serge E. Hallyn
Quoted 15 lines · Michal Simek
Hi All,
can you please to run clone01 syscall test on any x86 machine? I am getting fault there when I run it 10 times for example. The same problem I have on Microblaze.
./clone01 -c 10 clone01 1 TPASS : clone() returned 22738 clone01 1 TPASS : clone() returned 22740 clone01 1 TPASS : clone() returned 22742 clone01 1 TPASS : clone() returned 22748 clone01 1 TPASS : clone() returned 22750 clone01 1 TPASS : clone() returned 22752 clone01 1 TPASS : clone() returned 22754 clone01 1 TFAIL : clone() returned 134919589, errno = 22755Quoted 6 lines
[monstr@monstr clone]$ clone01 1 TPASS :
clone()returned 22744
clone01 1 TPASS :clone()returned 22746Thanks,
MichalAll right I don't have the patiente to wade through the
parse_optsandusc_libcrap, but this is not a clone failure. What appears to be happening issetup()at the top ofclone01.cis calling lib/parse_opts.c:usc_global_setup_hook(), withSTD_COPIESset to the count option you passed in. That forks of 10 copies of the test. I don't know what happens with the actual loop then, but the reason you get the error for the last clone test is that one of those forked copies of clone01 (*not* one of the cloned children) exits, andwait()catches that one. That is whywait()returned 22744, which isn't any of the cloned children.
Quoted 6 lines
Quoted 3 lines
So one stupid way of fixing this without dealing with the convoluted setup junk would be to change the waitpid chunk of the code like so:
Yes, it fixes the issue.
Yes, but as Serge wrote above his patch just cover different fault not solve it.
Regards,
Michal
Quoted 45 lines
Regards--
SubrataQuoted 39 lines
usr/src/ltp-intermediate-20090721.patched/testcases/kernel/syscalls/clone/clone01.c renamed from usr/src/ltp-intermediate-20090721/testcases/kernel/syscalls/clone/clone01.c +5
-6@@ -130,6 +132,7 @@ int main(int ac, char **av) (do_child, child_stack + CHILD_STACK_SIZE, SIGCHLD, NULL));#endif +again:if ((child_pid =wait (&status)) ==-1 ) {tst_brkm (TBROK , cleanup,"wait() failed; error no =" " %d, %s" , errno,strerror (errno));@@ -138,11 +141,11 @@ int main(int ac, char **av)/* check return code */ if (TEST_RETURN == child_pid) {tst_resm (TPASS ,"clone() returned %d" ,TEST_RETURN ); - }else { -tst_resm (TFAIL ,"clone() returned %d, errno = %d " , -"wait() returned %d" ,TEST_RETURN ,TEST_ERRNO , + }else if (TEST_RETURN ==-1 ) { +tst_resm (TFAIL ,"clone() returned %d, errno = %d wait() returned %d\n" ,TEST_RETURN ,TEST_ERRNO , child_pid); - } + }else + goto again; }/* End for TEST_LOOPING */ -serge ------------------------------------------------------------------------------Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Signature · 14 lines
Michal Simek, Ing. (M.Eng) PetaLogix - Linux Solutions for a Reconfigurable World w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 37 lines · Michal Simek
Quoted 36 lines · Subrata Modak
Quoted 34 lines · Serge E. Hallyn
Quoted 15 lines · Michal Simek
Hi All,
can you please to run clone01 syscall test on any x86 machine? I am getting fault there when I run it 10 times for example. The same problem I have on Microblaze.
./clone01 -c 10 clone01 1 TPASS : clone() returned 22738 clone01 1 TPASS : clone() returned 22740 clone01 1 TPASS : clone() returned 22742 clone01 1 TPASS : clone() returned 22748 clone01 1 TPASS : clone() returned 22750 clone01 1 TPASS : clone() returned 22752 clone01 1 TPASS : clone() returned 22754 clone01 1 TFAIL : clone() returned 134919589, errno = 22755Quoted 6 lines
[monstr@monstr clone]$ clone01 1 TPASS :
clone()returned 22744
clone01 1 TPASS :clone()returned 22746Thanks,
MichalAll right I don't have the patiente to wade through the
parse_optsandusc_libcrap, but this is not a clone failure. What appears to be happening issetup()at the top ofclone01.cis calling lib/parse_opts.c:usc_global_setup_hook(), withSTD_COPIESset to the count option you passed in. That forks of 10 copies of the test. I don't know what happens with the actual loop then, but the reason you get the error for the last clone test is that one of those forked copies of clone01 (*not* one of the cloned children) exits, andwait()catches that one. That is whywait()returned 22744, which isn't any of the cloned children.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
So one stupid way of fixing this without dealing with the convoluted setup junk would be to change the waitpid chunk of the code like so:
Yes, it fixes the issue.
Yes, but as Serge wrote above his patch just cover different fault not solve it.
Although that depends on what we think the fault really is. The reason we were getting fail messages was that children were exiting which we were (wrongly) not expecting. Now, I don't understand why setup() forks off N tasks, and it would probably be best to not do that. But in the end so long as we ignore when those tasks are reaped, it really doesn't matter that there were extra children. We are testing that clone(2) succeeded now, which is what we really care about.
-serge
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 28 lines · On Monday 03 August 2009 11:14:49 Serge E. Hallyn wrote:
Quoted 13 lines · Michal Simek
can you please to run clone01 syscall test on any x86 machine? I am getting fault there when I run it 10 times for example. The same problem I have on Microblaze.
./clone01 -c 10 clone01 1 TPASS : clone() returned 22738 clone01 1 TPASS : clone() returned 22740 clone01 1 TPASS : clone() returned 22742 clone01 1 TPASS : clone() returned 22748 clone01 1 TPASS : clone() returned 22750 clone01 1 TPASS : clone() returned 22752 clone01 1 TPASS : clone() returned 22754 clone01 1 TFAIL : clone() returned 134919589, errno = 22755Quoted 2 lines
[monstr@monstr clone]$ clone01 1 TPASS :
clone()returned 22744
clone01 1 TPASS :clone()returned 22746All right I don't have the patiente to wade through the
parse_optsandusc_libcrap, but this is not a clone failure. What appears to be happening issetup()at the top ofclone01.cis calling lib/parse_opts.c:usc_global_setup_hook(), withSTD_COPIESset to the count option you passed in. That forks of 10 copies of the test. I don't know what happens with the actual loop then, but the reason you get the error for the last clone test is that one of those forked copies of clone01 (*not* one of the cloned children) exits, andwait()catches that one. That is whywait()returned 22744, which isn't any of the cloned children.
Quoted 2 lines
So one stupid way of fixing this without dealing with the convoluted setup junk would be to change the waitpid chunk of the code like so:
since there is no wait*() func that i'm aware of that says "only wait for children/siblings", we need to create a dedicated process group for each test. do we know if any LTP test relies on process groups via the -c option ? i highly doubt this, so i'd propose we add a call to setpgid() in the parse_opts code that does the forking so that every child is in its own process group (just like if -c isnt used at all). then the clone01 test should magically work without any changes as should any other test that uses wait*() funcs. -mike
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list