[LTP] [PATCH V2 10/11] waitpid13: use the new API
Cyril Hrubis
chrubis@suse.cz
Thu Aug 25 14:07:40 CEST 2016
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
More information about the ltp
mailing list