From nobody Sun Feb 8 14:52:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1576745652; cv=none; d=zohomail.com; s=zohoarc; b=igQ4D5NQmhkD6sPzd2LmcyYrk9qgRaJeBoNoGENK+wrqkrIZ6eLDnPPaAr/Pm/DPeBAeGFRXYFDkfrF7Z1y0tDQXDtSbLXf/WuUZiMalFKYIIbyNLl7Jldnpa1iHfNf+COVs7dT55knqhxPkschBjlxFTFTEtyvIEcDZ5DPqHD4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576745652; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kNjZkrMWnUQseCa2fWrm95kgIXyLeVS8FTFQd4eDrUg=; b=dp5C7pahI371ktwiBtvjzjX9I2Dgp7fCaM5+gUVO6CDC3gnmmssNaA4XS2XkwcAWMp2cTgRZMzP6dbx/6mPnvwrTlKl/lOx1yCEA4acVO9Le8dpFcNKCGIykSy6z5tpjaD303c+SEBhR6+Q1yMWTFz5s3lzI1wzqcBlI2Uwk2+0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576745652633468.61529204755334; Thu, 19 Dec 2019 00:54:12 -0800 (PST) Received: from localhost ([::1]:37404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihrZT-0002QE-HI for importer@patchew.org; Thu, 19 Dec 2019 03:54:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36618) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihrWk-00071t-6K for qemu-devel@nongnu.org; Thu, 19 Dec 2019 03:51:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihrWi-00051z-PV for qemu-devel@nongnu.org; Thu, 19 Dec 2019 03:51:22 -0500 Received: from relay.sw.ru ([185.231.240.75]:55364) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihrWf-0004Xn-6A; Thu, 19 Dec 2019 03:51:17 -0500 Received: from vovaso.qa.sw.ru ([10.94.3.0] helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1ihrWV-0004DF-La; Thu, 19 Dec 2019 11:51:07 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v2 5/5] iotests: 194: test also migration of dirty bitmap Date: Thu, 19 Dec 2019 11:51:06 +0300 Message-Id: <20191219085106.22309-6-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191219085106.22309-1-vsementsov@virtuozzo.com> References: <20191219085106.22309-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com, quintela@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com, stefanha@redhat.com, den@openvz.org, mreitz@redhat.com, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Test that dirty bitmap migration works when we deal with mirror. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/194 | 14 ++++++++++---- tests/qemu-iotests/194.out | 6 ++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 index 72e47e8833..f48ddf6051 100755 --- a/tests/qemu-iotests/194 +++ b/tests/qemu-iotests/194 @@ -42,6 +42,8 @@ with iotests.FilePath('source.img') as source_img_path, \ .add_incoming('unix:{0}'.format(migration_sock_path)) .launch()) =20 + source_vm.qmp_log('block-dirty-bitmap-add', node=3D'drive0', name=3D'b= itmap0') + iotests.log('Launching NBD server on destination...') iotests.log(dest_vm.qmp('nbd-server-start', addr=3D{'type': 'unix', 'd= ata': {'path': nbd_sock_path}})) iotests.log(dest_vm.qmp('nbd-server-add', device=3D'drive0', writable= =3DTrue)) @@ -61,12 +63,14 @@ with iotests.FilePath('source.img') as source_img_path,= \ filters=3D[iotests.filter_qmp_event]) =20 iotests.log('Starting migration...') - source_vm.qmp('migrate-set-capabilities', - capabilities=3D[{'capability': 'events', 'state': True}]) - dest_vm.qmp('migrate-set-capabilities', - capabilities=3D[{'capability': 'events', 'state': True}]) + capabilities =3D [{'capability': 'events', 'state': True}, + {'capability': 'dirty-bitmaps', 'state': True}] + source_vm.qmp('migrate-set-capabilities', capabilities=3Dcapabilities) + dest_vm.qmp('migrate-set-capabilities', capabilities=3Dcapabilities) iotests.log(source_vm.qmp('migrate', uri=3D'unix:{0}'.format(migration= _sock_path))) =20 + source_vm.qmp_log('migrate-start-postcopy') + while True: event1 =3D source_vm.event_wait('MIGRATION') iotests.log(event1, filters=3D[iotests.filter_qmp_event]) @@ -82,3 +86,5 @@ with iotests.FilePath('source.img') as source_img_path, \ iotests.log('Stopping the NBD server on destination...') iotests.log(dest_vm.qmp('nbd-server-stop')) break + + iotests.log(source_vm.qmp('query-block')['return'][0]['dirty-bitmaps']) diff --git a/tests/qemu-iotests/194.out b/tests/qemu-iotests/194.out index 71857853fb..dd60dcc14f 100644 --- a/tests/qemu-iotests/194.out +++ b/tests/qemu-iotests/194.out @@ -1,4 +1,6 @@ Launching VMs... +{"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap0", "no= de": "drive0"}} +{"return": {}} Launching NBD server on destination... {"return": {}} {"return": {}} @@ -8,11 +10,15 @@ Waiting for `drive-mirror` to complete... {"data": {"device": "mirror-job0", "len": 1073741824, "offset": 1073741824= , "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_READY", "timestamp": {= "microseconds": "USECS", "seconds": "SECS"}} Starting migration... {"return": {}} +{"execute": "migrate-start-postcopy", "arguments": {}} +{"return": {}} {"data": {"status": "setup"}, "event": "MIGRATION", "timestamp": {"microse= conds": "USECS", "seconds": "SECS"}} {"data": {"status": "active"}, "event": "MIGRATION", "timestamp": {"micros= econds": "USECS", "seconds": "SECS"}} +{"data": {"status": "postcopy-active"}, "event": "MIGRATION", "timestamp":= {"microseconds": "USECS", "seconds": "SECS"}} {"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"mic= roseconds": "USECS", "seconds": "SECS"}} Gracefully ending the `drive-mirror` job on source... {"return": {}} {"data": {"device": "mirror-job0", "len": 1073741824, "offset": 1073741824= , "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_COMPLETED", "timestamp= ": {"microseconds": "USECS", "seconds": "SECS"}} Stopping the NBD server on destination... {"return": {}} +[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "per= sistent": false, "recording": true, "status": "active"}] --=20 2.21.0