[LTP] [PATCH] lsmod01.sh: retry test couple times to lower false positives

Petr Vorel pvorel@suse.cz
Thu Oct 24 09:49:08 CEST 2019


Hi Li, Jan,

...
> > > I wonder if we need to TBROK in TST_RETRY_FUNC(). We could just return
> > > what the FUNC returns and let the test decide.
> > > TST_RETRY_FUNC_BRK() could be a wrapper that TBROKs on timeout.
> > That could work (apart from the fact it diverges the functionality from C).
> > + there could be the third one, which TPASS/TFAIL (instead of
> > nothing/TBROK).

> > But this should be based on TST_RETRY_FN_EXP_BACKOFF (TST_RETRY_FUNC is
> > reusing
> > TST_RETRY_FN_EXP_BACKOFF) + add also TST_RETRY_FUNC wrappers.

> > Do we need similar functionality in C?


> Not sure, but we could collect the requirement for the EXP_BACKOFF series
> macro. I'm also thinking about to extend the functionality for more
> situations.

> e.g http://lists.linux.it/pipermail/ltp/2019-October/013896.html
+1 for @INFI - 1: retry infinitely, 0: retry in limit times

Combining with TPASS/TFAIL vs. nothing/TBROK it might make sense to either use
enum flags for C implementation, which would save one parameter and allow
further extension. Shell could have getopts instead of more parameters.
And it's a question whether cover all variants with wrappers like
TST_RETRY_FUNC* or not.

Kind regards,
Petr


More information about the ltp mailing list