Re: [LTP] [PATCH] detach_device: Wait until the kernel frees the loop device

Cyril Hrubis
2015-06-10T10:25:20Z

Hi!
> Do you mean printing of TINFO/TWARN messages right in the cycle?
>
> if (errno != EBUSY) {
> err = errno;
> tst_resm(TWARN,
> "ioctl(%s, LOOP_CLR_FD, 0) unexpectedly failed with: %s",
> dev, tst_strerrno(err));
> }
>
>
> But in the worst case, we may end up with 40 messages generated.
>
> Or do you mean saving the last errno and printing it to the final tst_brkm?

Either one works for me.

Having 40 messages is better than none. Because you will see these only
if something went wrong.

--
Cyril Hrubis
chrubis@suse.cz