[LTP] [PATCH v2 1/2] lib: add tst_get_timeout()
Jan Stancek
jstancek@redhat.com
Tue Aug 28 16:38:47 CEST 2018
----- Original Message -----
> Hello,
>
> Cyril Hrubis <chrubis@suse.cz> writes:
>
> > Hi!
> > It's just an idea, but we can make this even more elegant API.
> >
> > We measure the time in the test library anyway, so what about we added
> > something as tst_timeout_reached() that would return number of seconds
> > remaining to 80% of the real timeout or 0 if in a case that the timeout
> > was reached. Then we can use this as a soft-timeout in all the testcases
> > without any additional steps.
> >
> > --
> > Cyril Hrubis
> > chrubis@suse.cz
>
> 80% is probably way more than many of the CVE test cases need unless the
> overall timeout is reduced from 5 minutes. Probably 20% would be
> OK. Assuming this is the kind of usage scenario you had in mind.
I'd leave it to user. Give him data how much time is left,
and let him decide what is sensible limit for soft-timeout.
I'll send example in v3 series shortly.
>
> We could also call it tst_timeout_approaching, tst_timeout_near or
> tst_time_to_fail... not sure if they are any better.
>
> --
> Thank you,
> Richard.
>
More information about the ltp
mailing list