tests: Cover recent bug fixes
authorEric Blake <eblake@redhat.com>
Thu, 20 Oct 2016 00:48:15 +0000 (19:48 -0500)
committerWouter Verhelst <w@uter.be>
Sun, 30 Oct 2016 23:25:29 +0000 (00:25 +0100)
commit68bce6d6777f8d055118e1be810b41874d8ca3e1
treeeafeaa08e42d6521b33008c3d8e5ba9fa21b37a8
parent7e901617ece470c26ae0e0159f1a2b466719cdf8
tests: Cover recent bug fixes

Add a new test 'handshake' that intentionally provokes a server error
during option negotiation, before falling back to NBD_OPT_ABORT to
end negotiation, to prove that the server is correctly allowing a
client to fall back to known options; thus covering two recent bug
fixes for a server sending the wrong length in an error reply, and
for a server not reading enough data when replying to an unknown
command.

Signed-off-by: Eric Blake <eblake@redhat.com>
[reflowed in light of b8852465a]
Signed-off-by: Wouter Verhelst <w@uter.be>
tests/run/Makefile.am
tests/run/nbd-tester-client.c
tests/run/simple_test