From nobody Mon Apr 29 14:44:12 2024 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1522854223229706.4580169708101; Wed, 4 Apr 2018 08:03:43 -0700 (PDT) Received: from localhost ([::1]:36148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3jwo-0000RZ-6t for importer@patchew.org; Wed, 04 Apr 2018 11:03:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3jvC-0008BJ-3M for qemu-devel@nongnu.org; Wed, 04 Apr 2018 11:01:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f3jvA-0007yt-JH for qemu-devel@nongnu.org; Wed, 04 Apr 2018 11:01:58 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54006 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f3jv3-0007ig-PN; Wed, 04 Apr 2018 11:01:49 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F36F42636CF; Wed, 4 Apr 2018 15:01:48 +0000 (UTC) Received: from localhost (unknown [10.36.118.43]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF5E62024CA4; Wed, 4 Apr 2018 15:01:47 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Date: Wed, 4 Apr 2018 16:01:46 +0100 Message-Id: <20180404150146.23281-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 04 Apr 2018 15:01:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 04 Apr 2018 15:01:48 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'stefanha@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH for-2.12 v2] qemu-iotests: update 185 output 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: Kevin Wolf , QingFeng Hao , Stefan Hajnoczi , qemu-block@nongnu.org, Max Reitz 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" Commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 ("vl: introduce vm_shutdown()") added a bdrv_drain_all() call. As a side-effect of the drain operation the block job iterates one more time than before. The 185 output no longer matches and the test is failing now. It may be possible to avoid the superfluous block job iteration, but that type of patch is not suitable late in the QEMU 2.12 release cycle. This patch simply updates the 185 output file. The new behavior is correct, just not optimal, so make the test pass again. Fixes: 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 ("vl: introduce vm_shutdown= ()") Cc: Kevin Wolf Cc: QingFeng Hao Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: QingFeng Hao --- tests/qemu-iotests/185 | 10 ++++++---- tests/qemu-iotests/185.out | 12 +++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/185 b/tests/qemu-iotests/185 index f5b47e4c1a..298d88d04e 100755 --- a/tests/qemu-iotests/185 +++ b/tests/qemu-iotests/185 @@ -92,9 +92,8 @@ echo =3D=3D=3D Start commit job and exit qemu =3D=3D=3D echo =20 # Note that the reference output intentionally includes the 'offset' field= in -# BLOCK_JOB_CANCELLED events for all of the following block jobs. They are -# predictable and any change in the offsets would hint at a bug in the job -# throttling code. +# BLOCK_JOB_* events for all of the following block jobs. They are predict= able +# and any change in the offsets would hint at a bug in the job throttling = code. # # In order to achieve these predictable offsets, all of the following tests # use speed=3D65536. Each job will perform exactly one iteration before it= has @@ -102,11 +101,14 @@ echo # command to be received (after receiving the command, the rest runs # synchronously, so jobs can arbitrarily continue or complete). # +# Jobs present while QEMU is terminating iterate once more due to +# bdrv_drain_all(). +# # The buffer size for commit and streaming is 512k (waiting for 8 seconds = after # the first request), for active commit and mirror it's large enough to co= ver # the full 4M, and for backup it's the qcow2 cluster size, which we know is # 64k. As all of these are at least as large as the speed, we are sure tha= t the -# offset doesn't advance after the first iteration before qemu exits. +# offset advances exactly twice before qemu exits. =20 _send_qemu_cmd $h \ "{ 'execute': 'block-commit', diff --git a/tests/qemu-iotests/185.out b/tests/qemu-iotests/185.out index 57eaf8d699..2c4b04de73 100644 --- a/tests/qemu-iotests/185.out +++ b/tests/qemu-iotests/185.out @@ -20,7 +20,7 @@ Formatting 'TEST_DIR/t.qcow2', fmt=3Dqcow2 size=3D6710886= 4 backing_file=3DTEST_DIR/t.q {"return": {}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 524288, "speed": 65536, "type": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 1048576, "speed": 65536, "type": "commit"}} =20 =3D=3D=3D Start active commit job and exit qemu =3D=3D=3D =20 @@ -28,16 +28,18 @@ Formatting 'TEST_DIR/t.qcow2', fmt=3Dqcow2 size=3D67108= 864 backing_file=3DTEST_DIR/t.q {"return": {}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset= ": 4194304, "speed": 65536, "type": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "disk", "len": 4194304, "offset": 4= 194304, "speed": 65536, "type": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "disk", "len": 4194304, "offset= ": 4194304, "speed": 65536, "type": "commit"}} =20 =3D=3D=3D Start mirror job and exit qemu =3D=3D=3D =20 {"return": {}} Formatting 'TEST_DIR/t.qcow2.copy', fmt=3Dqcow2 size=3D67108864 cluster_si= ze=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 {"return": {}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_READY", "data": {"device": "disk", "len": 4194304, "offset": 4= 194304, "speed": 65536, "type": "mirror"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset= ": 4194304, "speed": 65536, "type": "mirror"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_COMPLETED", "data": {"device": "disk", "len": 4194304, "offset= ": 4194304, "speed": 65536, "type": "mirror"}} =20 =3D=3D=3D Start backup job and exit qemu =3D=3D=3D =20 @@ -46,7 +48,7 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=3Dqcow2 size=3D67= 108864 cluster_size=3D65536 l {"return": {}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 65536, "speed": 65536, "type": "backup"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 131072, "speed": 65536, "type": "backup"}} =20 =3D=3D=3D Start streaming job and exit qemu =3D=3D=3D =20 @@ -54,6 +56,6 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=3Dqcow2 size=3D67= 108864 cluster_size=3D65536 l {"return": {}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "SHUTDOWN", "data": {"guest": false}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 524288, "speed": 65536, "type": "stream"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offse= t": 1048576, "speed": 65536, "type": "stream"}} No errors were found on the image. *** done --=20 2.14.3