[LTP] [PATCH v4 2/5] tst_test.c: Add tst_multiply_timeout()

Clemens Famulla-Conrad cfamullaconrad@suse.de
Mon Oct 21 16:17:56 CEST 2019


On Mon, 2019-10-21 at 14:50 +0200, Petr Vorel wrote:

> +	if (timeout < 1)
> > +		tst_brk(TBROK, "timeout need to be >= 1! (%d)",
> > timeout);
> 
> need => needs, but better to use must (to be consistent with the
> previous one:
> 		tst_brk(TBROK, "timeout must to be >= 1! (%d)",
> timeout);

agree

> I also wonder, if this check is needed, next step is
> results->timeout = tst_multiply_timeout(timeout);
> which does the same check.

In shell we have the same check. And there it is more clear, as we
refer to TST_TIMEOUT variable. Here both messages just say "timeout"
but the linenumber would be more close to the actual call.

kind regards
Clemens


More information about the ltp mailing list