On 22.11.2016 18:54, Vladimir Sementsov-Ogievskiy wrote: > Test > - start two vms (vm_a, vm_b) > > - in a > - do writes from set A > - do writes from set B > - fix bitmap md5
*sha256 > - clear bitmap > - do writes from set A > - start migration > - than, in b > - wait vm start (postcopy should start) > - do writes from set B > - check btimap md5 *bitmap and *sha256 > > The test should verify postcopy migration and than merging with delta *then > (changes in target, during postcopy process). > > Reduce supported cache modes to only 'none', because with cache on time > from source.STOP to target.RESUME is unpredictable and we can fail with > timout while waiting for target.RESUME. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > tests/qemu-iotests/169 | 74 > +++++++++++++++++++++++++++++++++++++------ > tests/qemu-iotests/169.out | 4 +-- > tests/qemu-iotests/iotests.py | 7 +++- > 3 files changed, 72 insertions(+), 13 deletions(-) > > diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169 > index 58b1ab1..d438d12 100755 > --- a/tests/qemu-iotests/169 > +++ b/tests/qemu-iotests/169 > @@ -29,8 +29,14 @@ fifo = os.path.join(iotests.test_dir, 'mig_fifo') > > class TestDirtyBitmapMigration(iotests.QMPTestCase): > > - def setUp(self): > - size = 0x400000000 # 1G > + def tearDown(self): > + self.vm_a.shutdown() > + self.vm_b.shutdown() > + os.remove(disk_a) > + os.remove(disk_b) > + os.remove(fifo) > + > + def init(self, size): > os.mkfifo(fifo) > qemu_img('create', '-f', iotests.imgfmt, disk_a, str(size)) > qemu_img('create', '-f', iotests.imgfmt, disk_b, str(size)) > @@ -40,14 +46,8 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): > self.vm_a.launch() > self.vm_b.launch() > > - def tearDown(self): > - self.vm_a.shutdown() > - self.vm_b.shutdown() > - os.remove(disk_a) > - os.remove(disk_b) > - os.remove(fifo) > - > def test_migration(self): > + self.init(0x400000000) # 1G > granularity = 512 > regions = [ > { 'start': 0, 'count': 0x100000 }, > @@ -81,6 +81,60 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): > node='drive0', name='bitmap') > self.assert_qmp(result, 'return/sha256', sha256); > > + def test_postcopy(self): > + self.init(0x4000000000) # 128G I think it's rather 256 GB. With that and the commit message fixed: Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature