public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Kang Kai <kai.kang@windriver.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] mq_timedsend/5-1: make parent has chance to sleep
Date: Tue, 07 Feb 2012 15:33:27 +0800	[thread overview]
Message-ID: <4F30D3C7.5080303@cn.fujitsu.com> (raw)
In-Reply-To: <1328521976-810-2-git-send-email-kai.kang@windriver.com>

On 02/06/2012 05:52 PM, Kang Kai wrote:

> Child process sends the last signal before parent process enter the
> final sleep sometimes, so sleep in parent will not be interrupted then
> the case fails.
> Sleep 1 second before send the last signal in child to make sure parent
> enter the final sleep.


So many sleep() makes me confused.
Anyway, your patch makes sense. so,

Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

> 
> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
>  .../conformance/interfaces/mq_timedsend/5-1.c      |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
> index 96daf72..77fe2e0 100644
> --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
> @@ -82,6 +82,9 @@ int main()
>  		sleep(1);  // give parent time to set up handler
>  		for (i=0; i<MAXMSG+1; i++) {
>          		mq_timedsend(gqueue, msgptr, strlen(msgptr), 1, &ts);
> +			/* make sure parent enter the final sleep */
> +			if (i == MAXMSG)
> +				sleep(1);
>  			/* send signal to parent each time message is sent */
>  			kill(getppid(), SIGABRT);
>  		}
> @@ -138,4 +141,4 @@ int main()
>  	}
>  
>  	return PTS_UNRESOLVED;
> -}
> \ No newline at end of file
> +}



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2012-02-07  7:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06  9:52 [LTP] V2: mq_timedsend/5-1: make parent has chance to sleep Kang Kai
2012-02-06  9:52 ` [LTP] [PATCH] " Kang Kai
2012-02-07  7:33   ` Wanlong Gao [this message]
2012-02-16 18:41   ` Cyril Hrubis
  -- strict thread matches above, loose matches on Subject: below --
2011-12-31  3:32 Kang Kai
2012-01-09  1:58 ` Kang Kai
2012-01-09  5:19 ` Caspar Zhang
2012-01-10  2:14   ` Kang Kai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F30D3C7.5080303@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=kai.kang@windriver.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox