[LTP] [PATCH v2] tst_test: Add min_runtime to control lower bound of scaled runtime
Wei Gao
wegao@suse.com
Tue Jun 24 23:54:41 CEST 2025
On Tue, Jun 24, 2025 at 03:52:31PM +0800, Li Wang wrote:
> 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;
Thanks for clarification. I think above logic is better.
>
>
> 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.
No experience on *good* value for .min_runtime.
But i guess reusing value of .runtime is the safest option.
>
> --
> Regards,
> Li Wang
More information about the ltp
mailing list