Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blktests: fix how we handle waiting for nbd to connect
Because NBD has the old style configure the device directly config we sometimes have spurious failures where the device wasn't quite ready before the rest of the test continued. nbd/002 had been using _wait_for_nbd_connect, however this helper waits for the recv task to show up, which actually happens slightly before the size is set and we're actually ready to be read from. This means we would sometimes fail nbd/002 because the device wasn't quite right. Additionally nbd/001 has a similar issue where we weren't waiting for the device to be ready before going ahead with the test, which would cause spurious failures. Fix this by adjusting _wait_for_nbd_connect to only exit once the size for the device is being reported properly, meaning that it's ready to be read from. Then add this call to nbd/001 to eliminate the random failures we would see with this test. Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
- Loading branch information