[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/7] qemu-iotests/199: add early shutdown case to bitmaps postcop
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH 7/7] qemu-iotests/199: add early shutdown case to bitmaps postcopy |
Date: |
Wed, 22 Jan 2020 16:23:28 +0300 |
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 <address@hidden>
---
tests/qemu-iotests/199 | 12 +++++++++++-
tests/qemu-iotests/199.out | 4 ++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/199 b/tests/qemu-iotests/199
index a2c8ecab5a..a3f6c73aed 100755
--- a/tests/qemu-iotests/199
+++ b/tests/qemu-iotests/199
@@ -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'])
diff --git a/tests/qemu-iotests/199.out b/tests/qemu-iotests/199.out
index ae1213e6f8..fbc63e62f8 100644
--- a/tests/qemu-iotests/199.out
+++ b/tests/qemu-iotests/199.out
@@ -1,5 +1,5 @@
-.
+..
----------------------------------------------------------------------
-Ran 1 tests
+Ran 2 tests
OK
--
2.21.0
- [PATCH 0/7] Fix crashes on early shutdown during bitmaps postcopy, Vladimir Sementsov-Ogievskiy, 2020/01/22
- [PATCH 3/7] migration/block-dirty-bitmap: simplify dirty_bitmap_load_complete, Vladimir Sementsov-Ogievskiy, 2020/01/22
- [PATCH 5/7] migration/block-dirty-bitmap: cancel migration on shutdown, Vladimir Sementsov-Ogievskiy, 2020/01/22
- [PATCH 6/7] migration: handle to_src_file on target only for ram postcopy, Vladimir Sementsov-Ogievskiy, 2020/01/22
- [PATCH 7/7] qemu-iotests/199: add early shutdown case to bitmaps postcopy,
Vladimir Sementsov-Ogievskiy <=
- [PATCH 2/7] migration/block-dirty-bitmap: rename finish_lock to just lock, Vladimir Sementsov-Ogievskiy, 2020/01/22
- [PATCH 4/7] migration/block-dirty-bitmap: keep bitmap state for all bitmaps, Vladimir Sementsov-Ogievskiy, 2020/01/22
- [PATCH 1/7] migration/block-dirty-bitmap: refactor incoming state to be one struct, Vladimir Sementsov-Ogievskiy, 2020/01/22