public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] nanosleep testcase problem
@ 2010-01-04  5:07 Mitani
  2010-01-04 14:55 ` Michal Simek
  0 siblings, 1 reply; 3+ messages in thread
From: Mitani @ 2010-01-04  5:07 UTC (permalink / raw)
  To: ltp-list

Hi,

I want to wish you happy new year.


------

By the way, I found a new problem with the "nanosleep02" testcase.

"main()" function executes fork(), and child process calls "do_child()"
function.
"do_child()" function must be ended by "exit()". But in "nanosleep02"
testcase, there is a case in which "exit()" isn't executed.
Therefore, the child process lives after "do_child()" function, 
and it executes "wait()" function which must be executed in parent
process only.

Here is the patch fixes these problem:

============
--- nanosleep02.c	2009-12-23 02:35:13.000000000 +0900
+++ nanosleep02.c.new	2010-01-04 10:15:08.000000000 +0900
@@ -277,6 +277,9 @@
 		tst_resm(TPASS, "call succeeded");
 		exit(0);
 	}
+	
+	/* Everything is fine, exit normally */
+	exit(0);
 }
 
 /*
============


Regards--


-Tomonori Mitani



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] nanosleep testcase problem
  2010-01-04  5:07 [LTP] nanosleep testcase problem Mitani
@ 2010-01-04 14:55 ` Michal Simek
  2010-01-06  6:07   ` Garrett Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2010-01-04 14:55 UTC (permalink / raw)
  To: Mitani; +Cc: ltp-list

Mitani wrote:
> Hi,
> 
> I want to wish you happy new year.
> 
> 
> ------
> 
> By the way, I found a new problem with the "nanosleep02" testcase.
> 
> "main()" function executes fork(), and child process calls "do_child()"
> function.
> "do_child()" function must be ended by "exit()". But in "nanosleep02"
> testcase, there is a case in which "exit()" isn't executed.
> Therefore, the child process lives after "do_child()" function, 
> and it executes "wait()" function which must be executed in parent
> process only.

On Microblaze this test failed too. The patch fix it.

Michal

> 
> Here is the patch fixes these problem:
> 
> ============
> --- nanosleep02.c	2009-12-23 02:35:13.000000000 +0900
> +++ nanosleep02.c.new	2010-01-04 10:15:08.000000000 +0900
> @@ -277,6 +277,9 @@
>  		tst_resm(TPASS, "call succeeded");
>  		exit(0);
>  	}
> +	
> +	/* Everything is fine, exit normally */
> +	exit(0);
>  }
>  
>  /*
> ============
> 
> 
> Regards--
> 
> 
> -Tomonori Mitani
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


-- 
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

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] nanosleep testcase problem
  2010-01-04 14:55 ` Michal Simek
@ 2010-01-06  6:07   ` Garrett Cooper
  0 siblings, 0 replies; 3+ messages in thread
From: Garrett Cooper @ 2010-01-06  6:07 UTC (permalink / raw)
  To: michal.simek; +Cc: ltp-list, Mitani

On Mon, Jan 4, 2010 at 6:55 AM, Michal Simek <michal.simek@petalogix.com> wrote:
> Mitani wrote:
>> Hi,
>>
>> I want to wish you happy new year.
>>
>>
>> ------
>>
>> By the way, I found a new problem with the "nanosleep02" testcase.
>>
>> "main()" function executes fork(), and child process calls "do_child()"
>> function.
>> "do_child()" function must be ended by "exit()". But in "nanosleep02"
>> testcase, there is a case in which "exit()" isn't executed.
>> Therefore, the child process lives after "do_child()" function,
>> and it executes "wait()" function which must be executed in parent
>> process only.
>
> On Microblaze this test failed too. The patch fix it.
>
> Michal
>
>>
>> Here is the patch fixes these problem:
>>
>> ============
>> --- nanosleep02.c     2009-12-23 02:35:13.000000000 +0900
>> +++ nanosleep02.c.new 2010-01-04 10:15:08.000000000 +0900
>> @@ -277,6 +277,9 @@
>>               tst_resm(TPASS, "call succeeded");
>>               exit(0);
>>       }
>> +
>> +     /* Everything is fine, exit normally */
>> +     exit(0);
>>  }
>>
>>  /*

    Committed a change on CVS which forces the child to exit at the
end of do_child, like it should with tst_exit().
Thanks!
-Garrett

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-06  6:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04  5:07 [LTP] nanosleep testcase problem Mitani
2010-01-04 14:55 ` Michal Simek
2010-01-06  6:07   ` Garrett Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox