[LTP] [PATCH v2] tst_test: Add min_runtime to control lower bound of scaled runtime
Li Wang
liwang@redhat.com
Tue Jun 24 09:52:31 CEST 2025
Wei Gao <wegao@suse.com> wrote:
> > + * @min_runtime: Optional lower bound (in seconds) applied after
> runtime is
> > + * scaled by LTP_RUNTIME_MUL. If the scaled runtime is smaller
> > + * than this value, it will be clamped up to min_runtime.
> > + * This is useful for tests that require a minimum execution
> > + * time to gather sufficient samples or trigger events (e.g.,
> > + * probabilistic or fuzzy synchronization tests).
> > + * If not set, a default minimum of 1 second is enforced.
> Base your logic once .min_runtime is set then .runtime value effectively
> becomes irrelevant.
> So i guess we need mention it in above description?
>
Yes, combined with Martin's comment, we should at least ensure that
.runtime is not overwritten when it exists.
+ if (tst_test->min_runtime && !tst_test->runtime)
+ tst_test->runtime = tst_test->min_runtime;
Also, I make the .min_runtime uses the value of .runtime (then
remove .runtime) for those fuzzy_sync tests, that have a large
'pair.min_smaples' value.
But the default 1024 min_samples I still have no idea how long
the .min_runtime needs. Maybe we can estimate and set .min_runtime
on a slow system manually.
For others, which do not have strict requirements on execution
time, we only need to set .runtime.
--
Regards,
Li Wang
More information about the ltp
mailing list