qemu-iotests/199: add source-killed case to bitmaps postcopy
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 27 Jul 2020 19:42:36 +0000 (22:42 +0300)
committerEric Blake <eblake@redhat.com>
Mon, 27 Jul 2020 20:41:34 +0000 (15:41 -0500)
Previous patches fixes behavior of bitmaps migration, so that errors
are handled by just removing unfinished bitmaps, and not fail or try to
recover postcopy migration. Add corresponding test.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Tested-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200727194236.19551-22-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/199
tests/qemu-iotests/199.out

index 140930b2b12e5f5142a2806ebc23877f40449032..58fad872a12ce90b2e1c3857304582b772ac7b3d 100755 (executable)
@@ -241,6 +241,21 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
         self.vm_a.launch()
         check_bitmaps(self.vm_a, 0)
 
+    def test_early_kill_source(self):
+        self.start_postcopy()
+
+        self.vm_a_events = self.vm_a.get_qmp_events()
+        self.vm_a.kill()
+
+        self.vm_a.launch()
+
+        match = {'data': {'status': 'completed'}}
+        e_complete = self.vm_b.event_wait('MIGRATION', match=match)
+        self.vm_b_events.append(e_complete)
+
+        check_bitmaps(self.vm_a, 0)
+        check_bitmaps(self.vm_b, 0)
+
 
 if __name__ == '__main__':
     iotests.main(supported_fmts=['qcow2'])
index fbc63e62f885f55a8d6c777b49b180d529ba6e8e..8d7e996700935285e77f1c1156959cc27a7931bf 100644 (file)
@@ -1,5 +1,5 @@
-..
+...
 ----------------------------------------------------------------------
-Ran 2 tests
+Ran 3 tests
 
 OK