qmp_cont fails if vm in RUN_STATE_FINISH_MIGRATE, so let's wait for
final RUN_STATE_POSTMIGRATE. Also, while being here, check qmp_cont
result.
Reported-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
tests/qemu-iotests/169 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169
index 527aebd0cb..7e06cc1145 100755
--- a/tests/qemu-iotests/169
+++ b/tests/qemu-iotests/169
@@ -102,12 +102,17 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase):
event = self.vm_a.event_wait('MIGRATION')
if event['data']['status'] == 'completed':
break
+ while True:
+ result = self.vm_a.qmp('query-status')
+ if (result['return']['status'] == 'postmigrate'):
+ break
# test that bitmap is still here
removed = (not migrate_bitmaps) and persistent
self.check_bitmap(self.vm_a, False if removed else sha256)
- self.vm_a.qmp('cont')
+ result = self.vm_a.qmp('cont')
+ self.assert_qmp(result, 'return', {})
# test that bitmap is still here after invalidation
self.check_bitmap(self.vm_a, sha256)
--
2.18.0
24.01.2019 15:25, Vladimir Sementsov-Ogievskiy wrote:
> qmp_cont fails if vm in RUN_STATE_FINISH_MIGRATE, so let's wait for
> final RUN_STATE_POSTMIGRATE. Also, while being here, check qmp_cont
> result.
>
> Reported-by: Max Reitz <mreitz@redhat.com>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> tests/qemu-iotests/169 | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169
> index 527aebd0cb..7e06cc1145 100755
> --- a/tests/qemu-iotests/169
> +++ b/tests/qemu-iotests/169
> @@ -102,12 +102,17 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase):
> event = self.vm_a.event_wait('MIGRATION')
> if event['data']['status'] == 'completed':
> break
> + while True:
> + result = self.vm_a.qmp('query-status')
> + if (result['return']['status'] == 'postmigrate'):
> + break
possibly, not bad to add
+ time.sleep(0.1)
or 0.5, or something. (Note, that time module is already imported to the test)
>
> # test that bitmap is still here
> removed = (not migrate_bitmaps) and persistent
> self.check_bitmap(self.vm_a, False if removed else sha256)
>
> - self.vm_a.qmp('cont')
> + result = self.vm_a.qmp('cont')
> + self.assert_qmp(result, 'return', {})
>
> # test that bitmap is still here after invalidation
> self.check_bitmap(self.vm_a, sha256)
>
--
Best regards,
Vladimir
On 24.01.19 13:25, Vladimir Sementsov-Ogievskiy wrote: > qmp_cont fails if vm in RUN_STATE_FINISH_MIGRATE, so let's wait for > final RUN_STATE_POSTMIGRATE. Also, while being here, check qmp_cont > result. > > Reported-by: Max Reitz <mreitz@redhat.com> > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> > --- > tests/qemu-iotests/169 | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) Tested-by: Max Reitz <mreitz@redhat.com> Thanks!
© 2016 - 2025 Red Hat, Inc.