Commit 832d78ca authored by Vladimir Sementsov-Ogievskiy's avatar Vladimir Sementsov-Ogievskiy Committed by Kevin Wolf
Browse files

iotest: fix 169: do not run qmp_cont in RUN_STATE_FINISH_MIGRATE



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: default avatarMax Reitz <mreitz@redhat.com>
Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tested-by: default avatarMax Reitz <mreitz@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 9183dd15
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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)