[LTP] [PATCH] waitpid06: use the new API

Cyril Hrubis chrubis@suse.cz
Tue Jul 12 15:51:04 CEST 2016


Hi!
> I'd like to update those waitpid* test cases utilizing wait_for_parent()
> to use the checkpoint interface. It requires converting them for the
> new LTP API. This, in turn, drops UCLINUX support. However, since nobody
> has replied to:
> 
> http://lists.linux.it/pipermail/ltp/2016-May/001752.html
> 
> it (dropping UCLINUX) seems to be acceptable. Right?

I've even tried to subscribe to the uClinux-dev mailing list but it
looks like nobody manages it anymore. So I guess that we may start
dropping support for it.

> -static void setup_sigint(void)
> -{
> -	if ((sig_t) signal(SIGINT, inthandlr) == SIG_ERR) {
> -		tst_resm(TFAIL, "signal SIGINT failed. " "errno = %d", errno);
> -		exit(-1);
> +	pid = SAFE_FORK();
> +	if (pid == 0) {
> +		do_child_1();
> +	} else {
> +		SAFE_WAITPID(pid, &status, 0);
> +		if (WEXITSTATUS(status) != 0)
> +			tst_res(TFAIL, "Child returned bad status");
> +		else
> +			tst_res(TPASS, "Child returned good status");

Hmm, I guess that there is no reason for this indirection anymore. We
can just start MAXKIDS processes directly from the test() function.

Otherwise it looks good.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list