[LTP] [Automated-testing] [PATCH v3 01/29] Introduce a concept of max runtime

Richard Palethorpe rpalethorpe@suse.de
Tue May 24 11:25:22 CEST 2022


Hello,

"Cyril Hrubis" <chrubis@suse.cz> writes:

> This commit introduces a concept of max test runtime. In other words
> test runtime is capped at a certain value in order to make testruns more
> deterministic. Test is free to to finish before the runtime is used up,
> for example when maximal number of iterations was reached, but test must
> stop once the runtime has been used up.
>
> Testcases that run for more than a second or two must check for
> remaining runtime by regular calls to tst_remaining_runtime() and should
> exit when zero is returned.
>
> The test max runtime must be set either by the .max_iteration_runtime in
> the tst_test structure or in the test setup by a call to
> tst_set_runtime().
>
> The test timeout is then computed as a sum of DEFAULT_TIMEOUT (currently
> set to 30 seconds) and the test runtime. The DEFAULT_TIMEOUT is nothing
> more than a safety margin for teardown of the test.
>
> This commit also maps the -I parameter to the test max runtime if
> available and introduces LTP_RUNTIME_MUL enviroment variable so that we
> have an easy controll over the runtime cap.
>
> Lastly but not least the function related to the timeout are turned into
> no-op by this commit and removed after all test are converted to the
> runtime API.
>
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>

Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>

-- 
Thank you,
Richard.


More information about the ltp mailing list