diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-01-17 00:46:53 +0300 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2021-01-26 14:36:37 +0100 |
commit | 55f3e5cb3b187738b903ab72fe17472ab9354bd1 (patch) | |
tree | fe8d643d6489862abcc74c8210e5c880e42bc1a6 /tests | |
parent | 2c59fd833a6c547e174b26ba3e1f88f5865e16cf (diff) |
iotests: 56: prepare for backup over block-copy
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>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/qemu-iotests/056 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/qemu-iotests/056 b/tests/qemu-iotests/056 index 0e6b8591e7..b459a3f1e8 100755 --- a/tests/qemu-iotests/056 +++ b/tests/qemu-iotests/056 @@ -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', |