[LTP] [PATCH v2 8/9] doc: Document CPU and common test helpers
Petr Vorel
pvorel@suse.cz
Fri Sep 11 13:56:49 CEST 2026
Hi Andrea,
...
> +++ b/include/tst_common.h
> /**
> * TST_RETRY_FUNC() - Repeatedly retry a function with an increasing delay.
> - * @FUNC - The function which will be retried
> - * @ECHCK - Function/macro for validating @FUNC return value
> *
> - * This macro will call @FUNC in a loop with a delay between retries.
> - * If ECHCK(ret) evaluates to non-zero, the loop ends. The delay between
> - * retries starts at one microsecond and is then doubled each iteration until
> - * it exceeds one second (the total time sleeping will be approximately one
> - * second as well). When the delay exceeds one second, the loop will end.
> - * The TST_RETRY_FUNC() macro returns the last value returned by @FUNC.
> + * @FUNC: The function which will be retried.
> + * @ECHCK: Function or macro for validating @FUNC return value.
> + *
> + * This macro will call @FUNC in a loop with an exponential delay between
Interesting @FUNC seems to do the same formatting as ``FUNC`` (@ is maybe less
obvious formatting, but shorter than ``...``).
> + * retries. If ECHCK(ret) evaluates to non-zero, the loop ends. The delay
But it works only on a first item, i.e ECHCK(ret) would have to be formatted
with the usual ``ECHCK(ret)`` (maybe worth to change before merge).
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
More information about the ltp
mailing list