OSDN Git Service

tests: check if qemu-nbd is still alive before waiting
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 16 Nov 2018 15:53:23 +0000 (15:53 +0000)
committerEric Blake <eblake@redhat.com>
Mon, 19 Nov 2018 17:16:46 +0000 (11:16 -0600)
commitb39b58d5d0da3e7057d7d636641018b0fc25139b
treebfaa775e95e06fc6f09f51b5fce6b06b267fe8a1
parente6d5d6fdd43484f60f678e66c21f0d1286749977
tests: check if qemu-nbd is still alive before waiting

If the qemu-nbd UNIX socket has not shown up, the tests will sleep a bit
and then check again repeatedly for up to 30 seconds. This is pointless
if the qemu-nbd process has quit due to an error, so check whether the
pid is still alive before waiting and retrying.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20181116155325.22428-5-berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/common.nbd