mdaffin/loopdev

Unstable use of `losetup` in integration tests

flxo opened this issue · 0 comments

flxo commented

The integration tests make use of the losetup utility to attach and delete loop devices. losetup doesn't do any retries upon EBSY or EAGAIN errors that are issues from time to time from the loopdev driver. Especially when running the tests in parallel (which is the cargo default) the tests fail from time to time in the Travis setup. The test implementation tries to workaround this by adding delays before and after losetup calls.
The attempt to migrate the CI to Github actions has the same issues. Looks like the errors happen even more often than on Travis.

A possible solutions is to add retries to the losetup invocations. This is common approach that is seen in almost every piece of code that interacts with the loopback driver.