[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 14/14] iotests: add persistent bitmap migration t
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-devel] [PATCH v8 14/14] iotests: add persistent bitmap migration test |
Date: |
Mon, 30 Oct 2017 19:33:09 +0300 |
Test that persistent bitmap migrates and its persistance property
migrates too.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
tests/qemu-iotests/169 | 21 ++++++++++++++++++---
tests/qemu-iotests/169.out | 4 ++--
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169
index 4ecef2f23f..b0270f40f7 100755
--- a/tests/qemu-iotests/169
+++ b/tests/qemu-iotests/169
@@ -46,7 +46,7 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase):
self.vm_a.launch()
self.vm_b.launch()
- def test_migration(self):
+ def do_test_migration(self, persistent=False):
self.init(0x400000000) # 1G
granularity = 512
regions = [
@@ -55,8 +55,13 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase):
{ 'start': 0x399900000, 'count': 0x100000 }
]
- result = self.vm_a.qmp('block-dirty-bitmap-add', node='drive0',
- name='bitmap', granularity=granularity)
+ if persistent:
+ result = self.vm_a.qmp('block-dirty-bitmap-add', node='drive0',
+ name='bitmap', granularity=granularity,
+ persistent=True, autoload=True)
+ else:
+ result = self.vm_a.qmp('block-dirty-bitmap-add', node='drive0',
+ name='bitmap', granularity=granularity)
self.assert_qmp(result, 'return', {});
for r in regions:
@@ -77,10 +82,20 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase):
self.assertNotEqual(self.vm_b.event_wait("RESUME"), None)
time.sleep(2)
+ if persistent:
+ self.vm_b.shutdown()
+ self.vm_b.launch()
+
result = self.vm_b.qmp('x-debug-block-dirty-bitmap-sha256',
node='drive0', name='bitmap')
self.assert_qmp(result, 'return/sha256', sha256);
+ def test_migration(self):
+ self.do_test_migration()
+
+ def test_migration_persistent(self):
+ self.do_test_migration(persistent=True)
+
def test_postcopy(self):
self.init(0x4000000000) # 256G
write_size = 0x40000000
diff --git a/tests/qemu-iotests/169.out b/tests/qemu-iotests/169.out
index fbc63e62f8..8d7e996700 100644
--- a/tests/qemu-iotests/169.out
+++ b/tests/qemu-iotests/169.out
@@ -1,5 +1,5 @@
-..
+...
----------------------------------------------------------------------
-Ran 2 tests
+Ran 3 tests
OK
--
2.11.1
- [Qemu-devel] [PATCH v8 00/14] Dirty bitmaps postcopy migration, Vladimir Sementsov-Ogievskiy, 2017/10/30
- [Qemu-devel] [PATCH v8 01/14] block/dirty-bitmap: add bdrv_dirty_bitmap_enable_successor(), Vladimir Sementsov-Ogievskiy, 2017/10/30
- [Qemu-devel] [PATCH v8 11/14] iotests: add default node-name, Vladimir Sementsov-Ogievskiy, 2017/10/30
- [Qemu-devel] [PATCH v8 14/14] iotests: add persistent bitmap migration test,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-devel] [PATCH v8 08/14] migration/qemu-file: add qemu_put_counted_string(), Vladimir Sementsov-Ogievskiy, 2017/10/30
- [Qemu-devel] [PATCH v8 13/14] iotests: add dirty bitmap postcopy test, Vladimir Sementsov-Ogievskiy, 2017/10/30
- [Qemu-devel] [PATCH v8 07/14] migration: include migrate_dirty_bitmaps in migrate_postcopy, Vladimir Sementsov-Ogievskiy, 2017/10/30
- [Qemu-devel] [PATCH v8 06/14] qapi: add dirty-bitmaps migration capability, Vladimir Sementsov-Ogievskiy, 2017/10/30
- [Qemu-devel] [PATCH v8 12/14] iotests: add dirty bitmap migration test, Vladimir Sementsov-Ogievskiy, 2017/10/30
- [Qemu-devel] [PATCH v8 05/14] migration: introduce postcopy-only pending, Vladimir Sementsov-Ogievskiy, 2017/10/30
- [Qemu-devel] [PATCH v8 09/14] migration: add is_active_iterate handler, Vladimir Sementsov-Ogievskiy, 2017/10/30