From nobody Sat Feb 7 08:13:59 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1509381357658932.9443187658388; Mon, 30 Oct 2017 09:35:57 -0700 (PDT) Received: from localhost ([::1]:41623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9D2Q-000817-GO for importer@patchew.org; Mon, 30 Oct 2017 12:35:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9D08-0006LB-He for qemu-devel@nongnu.org; Mon, 30 Oct 2017 12:33:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9D03-0006bU-Di for qemu-devel@nongnu.org; Mon, 30 Oct 2017 12:33:24 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:43092 helo=relay.sw.ru) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e9D03-0006Zc-0Z; Mon, 30 Oct 2017 12:33:19 -0400 Received: from kvm.sw.ru (msk-vpn.virtuozzo.com [195.214.232.6]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id v9UGX9rb019366; Mon, 30 Oct 2017 19:33:13 +0300 (MSK) From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Mon, 30 Oct 2017 19:33:09 +0300 Message-Id: <20171030163309.75770-15-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20171030163309.75770-1-vsementsov@virtuozzo.com> References: <20171030163309.75770-1-vsementsov@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.x [fuzzy] X-Received-From: 195.214.232.25 Subject: [Qemu-devel] [PATCH v8 14/14] iotests: add persistent bitmap migration test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, vsementsov@virtuozzo.com, famz@redhat.com, lirans@il.ibm.com, quintela@redhat.com, jsnow@redhat.com, armbru@redhat.com, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org, amit.shah@redhat.com, pbonzini@redhat.com, dgilbert@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Test that persistent bitmap migrates and its persistance property migrates too. Signed-off-by: Vladimir Sementsov-Ogievskiy --- 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() =20 - def test_migration(self): + def do_test_migration(self, persistent=3DFalse): self.init(0x400000000) # 1G granularity =3D 512 regions =3D [ @@ -55,8 +55,13 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): { 'start': 0x399900000, 'count': 0x100000 } ] =20 - result =3D self.vm_a.qmp('block-dirty-bitmap-add', node=3D'drive0', - name=3D'bitmap', granularity=3Dgranularity) + if persistent: + result =3D self.vm_a.qmp('block-dirty-bitmap-add', node=3D'dri= ve0', + name=3D'bitmap', granularity=3Dgranular= ity, + persistent=3DTrue, autoload=3DTrue) + else: + result =3D self.vm_a.qmp('block-dirty-bitmap-add', node=3D'dri= ve0', + name=3D'bitmap', granularity=3Dgranular= ity) self.assert_qmp(result, 'return', {}); =20 for r in regions: @@ -77,10 +82,20 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): self.assertNotEqual(self.vm_b.event_wait("RESUME"), None) time.sleep(2) =20 + if persistent: + self.vm_b.shutdown() + self.vm_b.launch() + result =3D self.vm_b.qmp('x-debug-block-dirty-bitmap-sha256', node=3D'drive0', name=3D'bitmap') self.assert_qmp(result, 'return/sha256', sha256); =20 + def test_migration(self): + self.do_test_migration() + + def test_migration_persistent(self): + self.do_test_migration(persistent=3DTrue) + def test_postcopy(self): self.init(0x4000000000) # 256G write_size =3D 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 =20 OK --=20 2.11.1