Skip to content

Commit

Permalink
iotests: 56: prepare for backup over block-copy
Browse files Browse the repository at this point in the history
After introducing parallel async copy requests instead of plain
cluster-by-cluster copying loop, we'll have to wait for paused status,
as we need to wait for several parallel request. So, let's gently wait
instead of just asserting that job already paused.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-12-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and XanClic committed Jan 26, 2021
1 parent 2c59fd8 commit 55f3e5c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/qemu-iotests/056
Expand Up @@ -308,8 +308,13 @@ class BackupTest(iotests.QMPTestCase):
event = self.vm.event_wait(name="BLOCK_JOB_ERROR",
match={'data': {'device': 'drive0'}})
self.assertNotEqual(event, None)
# OK, job should be wedged
res = self.vm.qmp('query-block-jobs')
# OK, job should pause, but it can't do it immediately, as it can't
# cancel other parallel requests (which didn't fail)
with iotests.Timeout(60, "Timeout waiting for backup actually paused"):
while True:
res = self.vm.qmp('query-block-jobs')
if res['return'][0]['status'] == 'paused':
break
self.assert_qmp(res, 'return[0]/status', 'paused')
res = self.vm.qmp('block-job-dismiss', id='drive0')
self.assert_qmp(res, 'error/desc',
Expand Down

0 comments on commit 55f3e5c

Please sign in to comment.