From nobody Wed Nov 12 11:51:43 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.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=1570204417; cv=none; d=zoho.com; s=zohoarc; b=njb7WbkRz+HKhHvYYUZSMkPSVu1otRey1tQ6Dlw/ldHaXcF1VuEm9PLljT3R4q03CdNSiI+yJnFzVo150FPsfOy9c6lrREenCFUxT7d8HSqRSyXYNpKjJlV8tSeYUrv+VcMSKaiNtvtPPn/K1JdsTc95T6rpiE4uVO+vFauJZ/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570204417; 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:ARC-Authentication-Results; bh=LUJrkMRaymRe0KAQxOWFX3bCk7pD2wITXcphBoT3CKg=; b=cCdCuXDUghkDwaTSWqngLWUUkH7YmQSIspZ1D15QKLgLaVolpwHNsQCaBBJkHQLQ9vyXyC+X+tRmqPwT8F5Rpm+21A3MVYztA8BlKxlHNZL4Yf8FbM340YSQoSiQilJuWEoUJgwWKSI2EnkL66dkrSQt0hmIdE35dIfdKQShdbk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1570204417974293.9307257013072; Fri, 4 Oct 2019 08:53:37 -0700 (PDT) Received: from localhost ([::1]:49980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGPtW-0004tG-V3 for importer@patchew.org; Fri, 04 Oct 2019 11:53:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41118) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGPni-00037D-5z for qemu-devel@nongnu.org; Fri, 04 Oct 2019 11:47:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGPng-0005dW-QF for qemu-devel@nongnu.org; Fri, 04 Oct 2019 11:47:26 -0400 Received: from relay.sw.ru ([185.231.240.75]:36354) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iGPnR-0005EZ-J6; Fri, 04 Oct 2019 11:47:20 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iGPnL-00019e-IW; Fri, 04 Oct 2019 18:47:03 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH 5/5] iotests: 194: test also migration of dirty bitmap Date: Fri, 4 Oct 2019 18:47:01 +0300 Message-Id: <20191004154701.3202-6-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191004154701.3202-1-vsementsov@virtuozzo.com> References: <20191004154701.3202-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, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org, jsnow@redhat.com, dgilbert@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 d746ab1e21..bcf55a03e1 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