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>
This commit is contained in:
Stefan Hajnoczi 2014-02-26 15:30:20 +01:00
parent 1e8ece0db3
commit dc668ded10
3 changed files with 293 additions and 0 deletions

View file

@ -85,6 +85,7 @@
079 rw auto
081 rw auto
082 rw auto quick
083 rw auto
085 rw auto quick
086 rw auto quick
087 rw auto quick