]> git.proxmox.com Git - mirror_qemu.git/commit
iotests: Test cancelling a job and closing the VM
authorMax Reitz <mreitz@redhat.com>
Wed, 22 May 2019 14:40:37 +0000 (16:40 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 4 Jun 2019 13:20:41 +0000 (15:20 +0200)
commit74f27eadeae799c44d51ba53ffc94807be2b5834
tree1b558a06c804de09d2b6c9fc397bde04d843a734
parent5cb2737e925042e6c7cd3fb0b01313950b03cddf
iotests: Test cancelling a job and closing the VM

This patch adds a test where we cancel a throttled mirror job and
immediately close the VM before it can be cancelled.  Doing so will
invoke bdrv_drain_all() while the mirror job tries to drain the
throttled node.  When bdrv_drain_all_end() tries to lift its drain on
the throttle node, the job will exit and replace the current root node
of the BB drive0 (which is the job's filter node) by the throttle node.
Before the previous patch, this replacement did not increase drive0's
quiesce_counter by a sufficient amount, so when
bdrv_parent_drained_end() (invoked by bdrv_do_drained_end(), invoked by
bdrv_drain_all_end()) tried to end the drain on all of the throttle
node's parents, it decreased drive0's quiesce_counter below 0 -- which
fails an assertion.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/255
tests/qemu-iotests/255.out