iotests: Only kill NBD server if it runs
commitf798068c565918ead63218d083ff814b7635be72
authorMax Reitz <mreitz@redhat.com>
Tue, 2 Dec 2014 17:32:48 +0000 (2 18:32 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 10 Dec 2014 09:31:20 +0000 (10 10:31 +0100)
tree3b0c4047a3861d9209030ce87067a1252ab91971
parentb2439d26f078c826e5e06b34d978a6f6d5c7c56f
iotests: Only kill NBD server if it runs

There may be NBD tests which do not create a sample image and simply
test whether wrong usage of the protocol is rejected as expected. In
this case, there will be no NBD server and trying to kill it during
clean-up will fail.

Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/common.rc