diff --git a/tests/nbd/test-nbd.pl b/tests/nbd/test-nbd.pl index 1c8e0b2ef..c7361fd0a 100755 --- a/tests/nbd/test-nbd.pl +++ b/tests/nbd/test-nbd.pl @@ -74,17 +74,17 @@ sub run_test { die "qemu-nbd: $!"; } + # XXX qemu-nbd lacks any way to tell if it is awake and listening + # for connections. It could write a pid file or something. Could + # we check that the socket has been opened by looking in netstat? + sleep (2); + my $g = Sys::Guestfs->new (); # Add an NBD drive. $g->add_drive ("", readonly => $readonly, format => "raw", protocol => "nbd", server => [$server]); - # XXX qemu-nbd lacks any way to tell if it is awake and listening - # for connections. It could write a pid file or something. Could - # we check that the socket has been opened by looking in netstat? - sleep (2); - # This dies if qemu cannot connect to the NBD server. $g->launch ();