public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH V2 10/11] waitpid13: use the new API
Date: Thu, 25 Aug 2016 14:07:40 +0200	[thread overview]
Message-ID: <20160825120740.GH10490@rei.lan> (raw)
In-Reply-To: <1472041679-29759-11-git-send-email-stanislav.kholmanskikh@oracle.com>

Hi!
> +	if (TST_TRACE(waitpid_ret_test(0, &status, WNOHANG | WUNTRACED,
> +				       0, 0)))
> +		return;
>  
> -static void setup(void)
> -{
> -	TEST_PAUSE;
> -}
> -
> -static void cleanup(void)
> -{
> -}
> +	if (TST_TRACE(waitpid_ret_test(-group, &status, WNOHANG | WUNTRACED,
> +				       0, 0)))
> +		return;
>  
> -static void inthandlr(void)
> -{
> -	intintr++;
> -}
> +	TST_CHECKPOINT_WAKE2(0, MAXKIDS);
>  
> -static void wait_for_parent(void)
> -{
> -	int testvar;
> +	if (TST_TRACE(reap_children(0, WUNTRACED, fork_kid_pid + (MAXKIDS / 2),
> +				    MAXKIDS / 2)))
> +		return;
>  
> -	while (!intintr)
> -		testvar = 0;
> -}
> +	if (TST_TRACE(reap_children(-group, WUNTRACED, fork_kid_pid,
> +				    MAXKIDS / 2)))
> +		return;

Again, these are just cosmetic, but if we shorten the group to just grp
and the waitpid_ret_test to waitpid_test, all but one of these would fit
to one line.

Otherwise this looks good.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-08-25 12:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 12:27 [LTP] waitpid: new API (part 2) V2 Stanislav Kholmanskikh
2016-08-24 12:27 ` [LTP] [PATCH V2 01/11] waitpid09: use the new API Stanislav Kholmanskikh
2016-08-25 10:49   ` Cyril Hrubis
2016-08-24 12:27 ` [LTP] [PATCH V2 02/11] waitpid10: " Stanislav Kholmanskikh
2016-08-25 11:09   ` Cyril Hrubis
2016-08-24 12:27 ` [LTP] [PATCH V2 03/11] Add TST_TRACE Stanislav Kholmanskikh
2016-08-25 11:15   ` Cyril Hrubis
2016-08-25 12:09     ` Stanislav Kholmanskikh
2016-08-24 12:27 ` [LTP] [PATCH V2 04/11] syscalls/waitpid: call reap_children() via TST_TRACE() Stanislav Kholmanskikh
2016-08-25 11:20   ` Cyril Hrubis
2016-08-25 11:56     ` Stanislav Kholmanskikh
2016-08-24 12:27 ` [LTP] [PATCH V2 05/11] syscalls/waitpid: implement waitpid_ret_test() Stanislav Kholmanskikh
2016-08-25 11:28   ` Cyril Hrubis
2016-08-25 12:00     ` Stanislav Kholmanskikh
2016-08-24 12:27 ` [LTP] [PATCH V2 06/11] syscalls/waitpid: make reap_children() fail if errno is not ECHILD Stanislav Kholmanskikh
2016-08-24 12:27 ` [LTP] [PATCH V2 07/11] waitpid11: update the description Stanislav Kholmanskikh
2016-08-24 12:27 ` [LTP] [PATCH V2 08/11] waitpid12: use the new API Stanislav Kholmanskikh
2016-08-24 12:27 ` [LTP] [PATCH V2 09/11] syscalls/waitpid: adapt reap_children() to test stopped children Stanislav Kholmanskikh
2016-08-25 11:39   ` Cyril Hrubis
2016-08-25 12:02     ` Stanislav Kholmanskikh
2016-08-24 12:27 ` [LTP] [PATCH V2 10/11] waitpid13: use the new API Stanislav Kholmanskikh
2016-08-25 12:07   ` Cyril Hrubis [this message]
2016-08-24 12:27 ` [LTP] [PATCH V2 11/11] waitpid08: test stopped children Stanislav Kholmanskikh
2016-08-25 12:08   ` Cyril Hrubis
2016-08-26  9:06     ` Stanislav Kholmanskikh

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=20160825120740.GH10490@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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