From nobody Wed Dec 17 05:39:33 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1570547026; cv=none; d=zoho.com; s=zohoarc; b=g6SGiHnsanB1tIcbubUOsGuLTnwMDZRkokDSBN3zMXSa5MUukqU4vFYCQVCa4zrv8lQbMSUMuw3xDUbGMKE4A6LR47BrLaeNe/PqbCk9H8ASWRic4Ih4Gqu50gOryaubi92uhX1aIGtYh1BycuTQbKAZZF84ha5yv/oSfLms2Ag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570547026; 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=eWRLSrkhqfXF+B0sa/mg3vXlr25HyyOQBc7k2Y+K7tY=; b=MwawD8wzBKIaRhvHcGWmLpqhGdoE3YXm7mTbfydKClO4ipPkXWBzbceUS4an+2stOmQuCcyHqnz8rT/Bchv/Q6BZWHAVVRDgV2BD7qfhuOYiT5CWFghTJpFtZvLpLwIScHQyYmOhG8mcI2R1t+SQwdEKLl1WU0DmXwF2rqndO0g= 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 157054702659250.499481201795106; Tue, 8 Oct 2019 08:03:46 -0700 (PDT) Received: from localhost ([::1]:57180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHr1b-0008Bp-8P for importer@patchew.org; Tue, 08 Oct 2019 11:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54623) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHqtn-00010W-SS for qemu-devel@nongnu.org; Tue, 08 Oct 2019 10:55:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHqtm-0004AL-Lp for qemu-devel@nongnu.org; Tue, 08 Oct 2019 10:55:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47266) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iHqtf-00040o-0u; Tue, 08 Oct 2019 10:55:31 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 32AA3550CF; Tue, 8 Oct 2019 14:55:30 +0000 (UTC) Received: from localhost (ovpn-116-36.ams2.redhat.com [10.36.116.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id B87FA5C21F; Tue, 8 Oct 2019 14:55:29 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PULL 4/4] iotests/262: Switch source/dest VM launch order Date: Tue, 8 Oct 2019 15:55:05 +0100 Message-Id: <20191008145505.3641-5-stefanha@redhat.com> In-Reply-To: <20191008145505.3641-1-stefanha@redhat.com> References: <20191008145505.3641-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 08 Oct 2019 14:55:30 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 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 Zheng , Kevin Wolf , qemu-block@nongnu.org, Peter Maydell , "Michael S. Tsirkin" , Max Reitz , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Max Reitz Launching the destination VM before the source VM gives us a regression test for HEAD^: The guest device causes a read from the disk image through guess_disk_lchs(). This will not work if the first sector (containing the partition table) is yet unallocated, we use COR, and the node is inactive. By launching the source VM before the destination, however, the COR filter on the source will allocate that area in the image shared between both VMs, thus the problem will not become apparent. Switching the launch order causes the sector to still be unallocated when guess_disk_lchs() runs on the inactive node in the destination VM, and thus we get our test case. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20191001174827.11081-3-mreitz@redhat.com Message-Id: <20191001174827.11081-3-mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/262 | 12 ++++++------ tests/qemu-iotests/262.out | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/262 b/tests/qemu-iotests/262 index 398f63587e..0963daa806 100755 --- a/tests/qemu-iotests/262 +++ b/tests/qemu-iotests/262 @@ -54,12 +54,6 @@ with iotests.FilePath('img') as img_path, \ =20 os.mkfifo(fifo) =20 - iotests.log('Launching source VM...') - add_opts(vm_a) - vm_a.launch() - - vm_a.enable_migration_events('A') - iotests.log('Launching destination VM...') add_opts(vm_b) vm_b.add_incoming("exec: cat '%s'" % (fifo)) @@ -67,6 +61,12 @@ with iotests.FilePath('img') as img_path, \ =20 vm_b.enable_migration_events('B') =20 + iotests.log('Launching source VM...') + add_opts(vm_a) + vm_a.launch() + + vm_a.enable_migration_events('A') + iotests.log('Starting migration to B...') iotests.log(vm_a.qmp('migrate', uri=3D'exec:cat >%s' % (fifo))) with iotests.Timeout(3, 'Migration does not complete'): diff --git a/tests/qemu-iotests/262.out b/tests/qemu-iotests/262.out index 5a58e5e9f8..8e04c496c4 100644 --- a/tests/qemu-iotests/262.out +++ b/tests/qemu-iotests/262.out @@ -1,9 +1,9 @@ -Launching source VM... -Enabling migration QMP events on A... -{"return": {}} Launching destination VM... Enabling migration QMP events on B... {"return": {}} +Launching source VM... +Enabling migration QMP events on A... +{"return": {}} Starting migration to B... {"return": {}} {"data": {"status": "setup"}, "event": "MIGRATION", "timestamp": {"microse= conds": "USECS", "seconds": "SECS"}} --=20 2.21.0