Message ID | 20200217150246.29180-21-vsementsov@virtuozzo.com |
---|---|
State | New |
Headers | show |
Series | Fix error handling during bitmap postcopy | expand |
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: > Check that persistent bitmaps are not stored on source and that bitmaps > are persistent on destination. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> > --- > tests/qemu-iotests/199 | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/tests/qemu-iotests/199 b/tests/qemu-iotests/199 > index 969620b103..8baa078151 100755 > --- a/tests/qemu-iotests/199 > +++ b/tests/qemu-iotests/199 > @@ -117,7 +117,8 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase): > for i in range(nb_bitmaps): > result = self.vm_a.qmp('block-dirty-bitmap-add', node='drive0', > name='bitmap{}'.format(i), > - granularity=granularity) > + granularity=granularity, > + persistent=True) > self.assert_qmp(result, 'return', {}) > > result = self.vm_a.qmp('x-debug-block-dirty-bitmap-sha256', > @@ -193,6 +194,19 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase): > print('downtime:', downtime) > print('postcopy_time:', postcopy_time) > > + # check that there are no bitmaps stored on source > + self.vm_a_events += self.vm_a.get_qmp_events() > + self.vm_a.shutdown() > + self.vm_a.launch() > + check_bitmaps(self.vm_a, 0) > + > + # check that bitmaps are migrated and persistence works > + check_bitmaps(self.vm_b, nb_bitmaps) > + self.vm_b.shutdown() > + # recreate vm_b, so there is no incoming option, which prevents > + # loading bitmaps from disk > + self.vm_b = iotests.VM(path_suffix='b').add_drive(disk_b) > + self.vm_b.launch() > check_bitmaps(self.vm_b, nb_bitmaps) > > # Check content of migrated bitmaps. Still, don't waste time checking > Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
diff --git a/tests/qemu-iotests/199 b/tests/qemu-iotests/199 index 969620b103..8baa078151 100755 --- a/tests/qemu-iotests/199 +++ b/tests/qemu-iotests/199 @@ -117,7 +117,8 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase): for i in range(nb_bitmaps): result = self.vm_a.qmp('block-dirty-bitmap-add', node='drive0', name='bitmap{}'.format(i), - granularity=granularity) + granularity=granularity, + persistent=True) self.assert_qmp(result, 'return', {}) result = self.vm_a.qmp('x-debug-block-dirty-bitmap-sha256', @@ -193,6 +194,19 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase): print('downtime:', downtime) print('postcopy_time:', postcopy_time) + # check that there are no bitmaps stored on source + self.vm_a_events += self.vm_a.get_qmp_events() + self.vm_a.shutdown() + self.vm_a.launch() + check_bitmaps(self.vm_a, 0) + + # check that bitmaps are migrated and persistence works + check_bitmaps(self.vm_b, nb_bitmaps) + self.vm_b.shutdown() + # recreate vm_b, so there is no incoming option, which prevents + # loading bitmaps from disk + self.vm_b = iotests.VM(path_suffix='b').add_drive(disk_b) + self.vm_b.launch() check_bitmaps(self.vm_b, nb_bitmaps) # Check content of migrated bitmaps. Still, don't waste time checking
Check that persistent bitmaps are not stored on source and that bitmaps are persistent on destination. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> --- tests/qemu-iotests/199 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)