@@ -47,7 +47,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
self.vm_a.launch()
self.vm_b.launch()
- def test_postcopy(self):
+ def do_test_postcopy(self, early_shutdown):
write_size = 0x40000000
granularity = 512
chunk = 4096
@@ -99,6 +99,10 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
if event['data']['status'] == 'completed':
break
+ if early_shutdown:
+ self.vm_b.qmp('quit')
+ return
+
s = 0x8000
while s < write_size:
self.vm_b.hmp_qemu_io('drive0', 'write %d %d' % (s, chunk))
@@ -114,6 +118,12 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
self.assert_qmp(result, 'return/sha256', sha256);
+ def test_postcopy(self):
+ self.do_test_postcopy(False)
+
+ def test_postcopy_early_shutdown(self):
+ self.do_test_postcopy(True)
+
if __name__ == '__main__':
iotests.main(supported_fmts=['qcow2'], supported_cache_modes=['none'],
supported_protocols=['file'])
@@ -1,5 +1,5 @@
-.
+..
----------------------------------------------------------------------
-Ran 1 tests
+Ran 2 tests
OK
Previous patches fixed two crashes which may occur on shutdown prior to bitmaps postcopy finished. Check that it works now. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> --- tests/qemu-iotests/199 | 12 +++++++++++- tests/qemu-iotests/199.out | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-)