diff options
author | Max Reitz <mreitz@redhat.com> | 2015-01-26 21:02:59 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-02-06 17:24:22 +0100 |
commit | 1ce52846d3ce0e4b58caebcae84719bef6401fbb (patch) | |
tree | 47f86eff873a997ea9eb11e0804cd6b4b5757b61 /tests/qemu-iotests/083 | |
parent | a231cb272611c758d45135f6a35a4dd1beaf5585 (diff) |
nbd: Improve error messages
This patch makes use of the Error object for nbd_receive_negotiate() so
that errors during negotiation look nicer.
Furthermore, this patch adds an additional error message if the received
magic was wrong, but would be correct for the other protocol version,
respectively: So if an export name was specified, but the NBD server
magic corresponds to an old handshake, this condition is explicitly
signaled to the user, and vice versa.
As these messages are now part of the "Could not open image" error
message, additional filtering has to be employed in iotest 083, which
this patch does as well.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/083')
-rwxr-xr-x | tests/qemu-iotests/083 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/qemu-iotests/083 b/tests/qemu-iotests/083 index 991a9d91db..1b2d3f1156 100755 --- a/tests/qemu-iotests/083 +++ b/tests/qemu-iotests/083 @@ -56,7 +56,8 @@ filter_nbd() { # # Filter out the TCP port number since this changes between runs. sed -e 's#^.*nbd\.c:.*##g' \ - -e 's#nbd:127\.0\.0\.1:[^:]*:#nbd:127\.0\.0\.1:PORT:#g' + -e 's#nbd:127\.0\.0\.1:[^:]*:#nbd:127\.0\.0\.1:PORT:#g' \ + -e 's#\(exportname=foo\|PORT\): Failed to .*$#\1#' } check_disconnect() { |