qemu-iotests: add 083 NBD client disconnect tests
commitdc668ded1009f88da5e31bc5a143cf3e9070d49b
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 26 Feb 2014 14:30:20 +0000 (26 15:30 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 14 Mar 2014 15:29:02 +0000 (14 16:29 +0100)
treefcc022ad05a2b142d90f48cc82196842e94cf0c0
parent1e8ece0db3e8604d3a17bbd2bd1277161851a44a
qemu-iotests: add 083 NBD client disconnect tests

This new test case uses nbd-fault-injector.py to simulate broken TCP
connections at each stage in the NBD protocol.  This way we can exercise
block/nbd-client.c's socket error handling code paths.

In particular, this serves as a regression test to make sure
nbd-client.c doesn't cause an infinite loop by leaving its
nbd_receive_reply() fd handler registered after the connection has been
closed.  This bug was fixed in an earlier patch.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/qemu-iotests/083 [new file with mode: 0755]
tests/qemu-iotests/083.out [new file with mode: 0644]
tests/qemu-iotests/group