test-bdrv-drain: Add test for node deletion
commit4c8158e359d194394c64acd21caf5e3f3f3141c2
authorMax Reitz <mreitz@redhat.com>
Wed, 28 Feb 2018 18:04:54 +0000 (28 19:04 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 18 Jun 2018 13:03:25 +0000 (18 15:03 +0200)
tree263f5eae991f095587472206b82ca28bcd68d288
parentd30b8e64b7b282da785307504ada59efa8096fb1
test-bdrv-drain: Add test for node deletion

This patch adds two bdrv-drain tests for what happens if some BDS goes
away during the drainage.

The basic idea is that you have a parent BDS with some child nodes.
Then, you drain one of the children.  Because of that, the party who
actually owns the parent decides to (A) delete it, or (B) detach all its
children from it -- both while the child is still being drained.

A real-world case where this can happen is the mirror block job, which
may exit if you drain one of its children.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/test-bdrv-drain.c