tests: Test mid-drain bdrv_replace_child_noperm()
commit0513f9841f14b918bd7aa7f1c8fb0ac3b0f6dea0
authorMax Reitz <mreitz@redhat.com>
Mon, 22 Jul 2019 13:33:46 +0000 (22 15:33 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 16 Aug 2019 08:25:16 +0000 (16 10:25 +0200)
tree2c6ef3f4f31be88f1ab734a65c6dae79e23a13cf
parent9746b35cf3c1a60cf569d8caa434aa1ee919e63f
tests: Test mid-drain bdrv_replace_child_noperm()

Add a test for what happens when you call bdrv_replace_child_noperm()
for various drain situations ({old,new} child {drained,not drained}).

Most importantly, if both the old and the new child are drained, the
parent must not be undrained at any point.

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