mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
tests/nbd/test-nbd.pl contains a hack (a call to sleep) to wait for qemu-nbd to start up in another process. This sleep was previously located before the call to $g->launch() since that is where (previous to commit4a0f5ed382) the backend would have connected to the NBD server. However in the new code, an initial NBD connection test is done when the drive is added (ie. $g->add_drive (..., protocol=>"nbd")), which duly failed intermittently because the qemu-nbd server had not opened its socket yet. Move the wait earlier -- just after the fork -- to avoid this. This updates commit4a0f5ed382.