public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Carmelo AMOROSO <carmelo.amoroso@st.com>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] setrlimit01: wait for all children to exit in test3
Date: Wed, 21 Mar 2012 09:15:15 +0100	[thread overview]
Message-ID: <4F698E13.2070909@st.com> (raw)
In-Reply-To: <1332257989-22829-1-git-send-email-salvatore.cro@st.com>

On 20/03/2012 16.39, Salvatore CRO' wrote:
> In test3, parent just wait for one child to exit but it
> actually has 10.
> As it could happen there may be other children around that
> didn't get yet the chance to exit, they will get signaled
> by ltp-pan (SIGTERM) and pollute the output of subsequent
> test (setrlimit02).
> Parent definitely needs to wait for all children to exit.
> 
> Signed-off-by: Salvatore Cro <salvatore.cro@st.com>

Acked-by: Carmelo Amoroso <carmelo.amoroso@st.com>

> ---
>  testcases/kernel/syscalls/setrlimit/setrlimit01.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit01.c b/testcases/kernel/syscalls/setrlimit/setrlimit01.c
> index ac32450..430835c 100644
> --- a/testcases/kernel/syscalls/setrlimit/setrlimit01.c
> +++ b/testcases/kernel/syscalls/setrlimit/setrlimit01.c
> @@ -267,7 +267,7 @@ void test3()
>  			exit(0);
>  		}
>  	}
> -	waitpid(pid, &status, 0);
> +	while(wait(&status) > 0) { /* no-op */ ; }
>  	if (WEXITSTATUS(status) != 0) {
>  		tst_resm(TFAIL, "RLIMIT_NPROC functionality is not correct");
>  	} else {


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2012-03-21  8:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 15:39 [LTP] [PATCH] setrlimit01: wait for all children to exit in test3 Salvatore CRO'
2012-03-21  8:15 ` Carmelo AMOROSO [this message]
2012-03-21  9:41 ` ZhoupingLiu
2012-03-21  9:46   ` Caspar Zhang
2012-03-21 11:10     ` Salvatore CRO'
2012-03-23  7:13       ` Salvatore CRO'

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=4F698E13.2070909@st.com \
    --to=carmelo.amoroso@st.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