tst_device: sleep/retry if LOOP_CLR_FD fails with EBUSY

Rapid succession of device attach/detach may lead to EBUSY
from ioctl(LOOP_CLR_FD), because udev rules might still be
running.

Sleep/retry for a short period if LOOP_CLR_FD fails with EBUSY.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
1 file changed