[LTP] [RFC PATCh] lib: redefine the overall timeout logic of test

Li Wang liwang@redhat.com
Thu Jan 9 11:45:20 CET 2025


On Thu, Jan 9, 2025 at 6:35 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> > > The reason for calling tst_set_runtime() in each iteration is that we
> can
> > > directly utilize the real elapsed time as runtime and don't need to do
> > > additional measurements.
> > >
> >
> > Forgot to say, that each iteration has four sub-tcases to accomplish.
> > The recommended way (you gave above) is to regard them as one
> > big test and reset timeout by heartbeat() in tst_test->tcnt. If this
> value
> > is big enough, that's fine. But I fear that value (come from measurement)
> > is still not covered all situations.
>
> I agree that the test is a bit unpredictable, as it synces filesytem and
> drops caches twice in each iteration. However the .timeout is a safety
> mechanism, so nothing stops us for making it 4x or 8x of the usuall
> test execution time on slower hardware.
>

Ok, I will collect a proper timeout value on my RPi4 and
go with the recommendation way.

Then, let's see how it goes in the future.


-- 
Regards,
Li Wang


More information about the ltp mailing list