Re: lib: Use backoff polling to wait for loop device nodes

[email protected]
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
Hi Wake,

On Aug 7, 2026, Wake Liu wrote:
> lib: Use backoff polling to wait for loop device nodes

> Introduce an exponential-backoff retry loop in both
> tst_find_free_loopdev() and tst_attach_device() (starting at 1ms delay,
> doubling each try, capped at 100ms) to wait for the device node to be
> successfully populated.

Could the timing description be corrected, or the implementation changed to
match it? TST_RETRY_FN_EXP_BACKOFF() starts tst_delay_ at 1 and passes it to
usleep(), so the first delay is 1 microsecond. MAX_DELAY is converted from
seconds to microseconds, so passing 1 retries for about one second before LTP
timeout scaling, not 100 ms.

Verdict - Needs revision

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.