[LTP] [PATCH] lib/tst_device.c: Add exception handling of function tst_find_free_loopdev

Petr Vorel pvorel@suse.cz
Wed Mar 10 15:03:12 CET 2021


Hi,

> > Because of race condition or abnormal env, set_dev_path may be
> > return 1. And when set_dev_path return 1 in tst_find_free_loopdev,
> > we should return Immediately.


> If there exists a race condition, I firstly think of the TST_RETRY_FUNC
> macro
> to try more times for the set_dev_path. That might help to get the function
> success
> in the follow-up tries.

+1

Kind regards,
Petr


More information about the ltp mailing list