[LTP] [PATCH 2/3] shell: Introduce LTP_TIMEOUT variable

Petr Vorel pvorel@suse.cz
Fri Sep 13 12:46:41 CEST 2019


Hi

<snip>
> > diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
> > index ca63745fd..f427cd459 100644
> > --- a/testcases/lib/tst_test.sh
> > +++ b/testcases/lib/tst_test.sh
> > @@ -379,9 +379,31 @@ _tst_rescmp()

> >  _tst_setup_timer()
> >  {
> > +	TST_TIMEOUT=${TST_TIMEOUT:-300}
> >  	LTP_TIMEOUT_MUL=${LTP_TIMEOUT_MUL:-1}

> > -	local sec=$((300 * LTP_TIMEOUT_MUL))
> > +	if [ "$LTP_TIMEOUT_MUL" = -1 ]; then
> > +		tst_res TINFO "Timeout per run is disabled"
> > +		return
> > +	fi
> > +
> > +	local err
> > +	tst_is_num || err=1

> Not sure to understand what's going on here ....tst_is_num needs at least an arg right ?
Good point, it should have been
tst_is_num "$TST_TIMEOUT" || err=1

And I omit to grep TIMEOUT" in tst_run() in tst_test.s.

> > +	if tst_is_int; then
> > +		[ "$LTP_TIMEOUT_MUL" -ge 1 ] || err=1

> ....same for tst_is_int .... and I can see no trace of code handling the new LTP_TIMEOUT
> around this patch...am I missing something ?
Sorry, s/LTP_TIMEOUT/TST_TIMEOUT in docs and tests. Will be in v2.

> Cheers 

> Cristian

Kind regards,
Petr

PS: please snip the unrelated content in long patches like this one
(easier to read in both mail and patchwork).


More information about the ltp mailing list