From nobody Tue Feb 10 05:26: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=1579699556; cv=none; d=zohomail.com; s=zohoarc; b=KjhcjPwqtT4suFEZlSnK+DjZVtQ42LXd6dSz5DxhkUsFb6kscH8ii+yoxFuX4xmJOSiARZLYqTsNYj5f267Va+27usSSXL1YJkyax2Ut3yIyeHhUnkAFp/HDKG8X086RF3Y8npf8K/KoEVEkAPicc3t2chDTTYWxkXUZEK7j5Mw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579699556; 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=ej2wIaq+QVyZyRIZMfVepneS+Pt9H89tHu5MlPbFp1U=; b=J5TXO4gHSzKv2oNto3zCMjh82DgDxh5+kxAWt7vFFdf9wbmrDNBl6Wma9L+Y/es87eJWNq04g3vPf0fOgOZCQFncf8/KC9a9lTesbppjCM+rkOCijLjy3misC2gAt2LffOCJ5MXDnJ/KpzgnvlJkUDBKAKuxQM4Qde5ypsKsy1Y= 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 1579699556017398.5702638956051; Wed, 22 Jan 2020 05:25:56 -0800 (PST) Received: from localhost ([::1]:42052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuG14-0000su-Ko for importer@patchew.org; Wed, 22 Jan 2020 08:25:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51908) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuFyw-0006mi-Ie for qemu-devel@nongnu.org; Wed, 22 Jan 2020 08:23:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuFyv-0002MV-F8 for qemu-devel@nongnu.org; Wed, 22 Jan 2020 08:23:42 -0500 Received: from relay.sw.ru ([185.231.240.75]:42306) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iuFys-0002I2-R0; Wed, 22 Jan 2020 08:23:39 -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 1iuFyk-00057B-Oq; Wed, 22 Jan 2020 16:23:30 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 7/7] qemu-iotests/199: add early shutdown case to bitmaps postcopy Date: Wed, 22 Jan 2020 16:23:28 +0300 Message-Id: <20200122132328.31156-8-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200122132328.31156-1-vsementsov@virtuozzo.com> References: <20200122132328.31156-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: kwolf@redhat.com, fam@euphon.net, vsementsov@virtuozzo.com, quintela@redhat.com, dgilbert@redhat.com, mreitz@redhat.com, stefanha@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" Previous patches fixed two crashes which may occur on shutdown prior to bitmaps postcopy finished. Check that it works now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/199 | 12 +++++++++++- tests/qemu-iotests/199.out | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/199 b/tests/qemu-iotests/199 index a2c8ecab5a..a3f6c73aed 100755 --- a/tests/qemu-iotests/199 +++ b/tests/qemu-iotests/199 @@ -47,7 +47,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCas= e): self.vm_a.launch() self.vm_b.launch() =20 - def test_postcopy(self): + def do_test_postcopy(self, early_shutdown): write_size =3D 0x40000000 granularity =3D 512 chunk =3D 4096 @@ -99,6 +99,10 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCa= se): if event['data']['status'] =3D=3D 'completed': break =20 + if early_shutdown: + self.vm_b.qmp('quit') + return + s =3D 0x8000 while s < write_size: self.vm_b.hmp_qemu_io('drive0', 'write %d %d' % (s, chunk)) @@ -114,6 +118,12 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTest= Case): =20 self.assert_qmp(result, 'return/sha256', sha256); =20 + def test_postcopy(self): + self.do_test_postcopy(False) + + def test_postcopy_early_shutdown(self): + self.do_test_postcopy(True) + if __name__ =3D=3D '__main__': iotests.main(supported_fmts=3D['qcow2'], supported_cache_modes=3D['non= e'], supported_protocols=3D['file']) diff --git a/tests/qemu-iotests/199.out b/tests/qemu-iotests/199.out index ae1213e6f8..fbc63e62f8 100644 --- a/tests/qemu-iotests/199.out +++ b/tests/qemu-iotests/199.out @@ -1,5 +1,5 @@ -. +.. ---------------------------------------------------------------------- -Ran 1 tests +Ran 2 tests =20 OK --=20 2.21.0