[LTP] [PATCH 4/4] libs: sigwait: Get rid of REPORT_SUCCESS() macro

Petr Vorel pvorel@suse.cz
Fri Jul 24 15:35:24 CEST 2020


Hi,

...
> >  	TEST(sigwaitinfo(&sigs, &si, NULL));
> > -	REPORT_SUCCESS(-1, EINTR);
> > +	if (TST_RET == -1) {
> > +		if (TST_ERR == EINTR)
> > +			tst_res(TPASS, "%s: Test passed", __func__);
> > +		else
> > +			tst_res(TFAIL | TTERRNO, "%s: Unexpected failure", __func__);

> Can we please make the messages a bit more user friendly?

> - the tst_res() already prints line and filename the __func__ is a bit
>   redundant

> - it also prints PASS/FAIL so we can omit the "Test passed" we can print
>   something that describes the testcase instead e.g.
>   "Wait interrupted by a signal"

> - also in the "Unexpected failure" case we should print which error we
>   expected with someting as: tst_res(TFAIL | TTERRNO, "Expected to return EINTER, got");

+1, sorry for overlooking it.

Kind regards,
Petr


More information about the ltp mailing list