[LTP] [PATCH 6/6] lib: Add tst_set_runtime() & remove tst_set_timeout()

Cyril Hrubis chrubis@suse.cz
Tue Oct 26 09:56:19 CEST 2021


Hi!
> Yes, that should be great.
> 
> After a quick reviewing the whole patchset, I feel that .timeout is
> redundant since .max_runtime can do more thing to totally replace
> it by the end.

Agreed.

> ----------------
> 
> Btw, it looks weird to simply double the runtime by plus MAX(10u, runtime)
> in the runtime_to_timeout, I guess you probably just wanna another
> 10sec for some reclaiming work.

The exact formula is up for a discussion, but I do not think that we
should make it too tight, it's just a safety that is not going to be
triggered unless there is a real bug.

> And the .max_runtime is also maximal time per test iteration,
> but from the output below misleading me to think it is for the
> whole test time.
> 
> See:
> 
> # LTP_TIMEOUT_MUL=1 ./pty03
> tst_test.c:1376: TINFO: Test max runtime 360s
> tst_test.c:1371: TINFO: Timeout per run is 0h 12m 00s
> ....

Ah, right, that should be fixed. Anything else that should be fixed?

Also once we get this merged as well as the preprocessor support for the
metadata extractor it's going to be fairly easy to write a short script
that parses the metadata and then prints overall test runtime given a
test name, which is what I'm going to send once these two patchsets are
merged.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list