From nobody Thu May 2 20:46:35 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 1500998308171237.31079109551638; Tue, 25 Jul 2017 08:58:28 -0700 (PDT) Received: from localhost ([::1]:33373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da2E4-0001SB-Rc for importer@patchew.org; Tue, 25 Jul 2017 11:58:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da2Cc-0000CT-3e for qemu-devel@nongnu.org; Tue, 25 Jul 2017 11:56:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da2Cb-0003Mw-CV for qemu-devel@nongnu.org; Tue, 25 Jul 2017 11:56:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32990) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1da2CZ-0003Ld-8A; Tue, 25 Jul 2017 11:56:51 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 226B761D37; Tue, 25 Jul 2017 15:56:50 +0000 (UTC) Received: from localhost (ovpn-204-250.brq.redhat.com [10.40.204.250]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 851D060607; Tue, 25 Jul 2017 15:56:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 226B761D37 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mreitz@redhat.com From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 25 Jul 2017 17:56:43 +0200 Message-Id: <20170725155644.20214-2-mreitz@redhat.com> In-Reply-To: <20170725155644.20214-1-mreitz@redhat.com> References: <20170725155644.20214-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 25 Jul 2017 15:56:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/2] iotests: Fix test 156 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 , qemu-devel@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" On one hand, the _make_test_img invocation for creating the target image was missing a -u because its backing file is not supposed to exist at that point. On the other hand, nobody noticed probably because the backing file is created later on and _cleanup failed to remove it: The quotation marks were misplaced so bash tried to deleted a file literally called "$TEST_IMG{,.target}..." instead of resolving the globs. Thus, the files stayed around after the first run and qemu-img create did not complain about a missing backing file on any run but the first. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- tests/qemu-iotests/156 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/156 b/tests/qemu-iotests/156 index 2c4a06e..e75dc4d 100755 --- a/tests/qemu-iotests/156 +++ b/tests/qemu-iotests/156 @@ -38,7 +38,7 @@ status=3D1 # failure is the default! _cleanup() { _cleanup_qemu - rm -f "$TEST_IMG{,.target}{,.backing,.overlay}" + rm -f "$TEST_IMG"{,.target}{,.backing,.overlay} } trap "_cleanup; exit \$status" 0 1 2 3 15 =20 @@ -83,7 +83,7 @@ _send_qemu_cmd $QEMU_HANDLE \ 'return' =20 # Create target image -TEST_IMG=3D"$TEST_IMG.target.overlay" _make_test_img -b "$TEST_IMG.target"= 1M +TEST_IMG=3D"$TEST_IMG.target.overlay" _make_test_img -u -b "$TEST_IMG.targ= et" 1M =20 # Mirror snapshot _send_qemu_cmd $QEMU_HANDLE \ --=20 2.9.4 From nobody Thu May 2 20:46:35 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 1500998307267345.21945993954307; Tue, 25 Jul 2017 08:58:27 -0700 (PDT) Received: from localhost ([::1]:33372 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da2E3-0001Rz-TB for importer@patchew.org; Tue, 25 Jul 2017 11:58:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da2Cf-0000Fa-KC for qemu-devel@nongnu.org; Tue, 25 Jul 2017 11:57:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da2Ce-0003P1-Jd for qemu-devel@nongnu.org; Tue, 25 Jul 2017 11:56:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51538) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1da2Cc-0003Mu-41; Tue, 25 Jul 2017 11:56:54 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E749C7EA83; Tue, 25 Jul 2017 15:56:52 +0000 (UTC) Received: from localhost (ovpn-204-250.brq.redhat.com [10.40.204.250]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D6B75D966; Tue, 25 Jul 2017 15:56:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E749C7EA83 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mreitz@redhat.com From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 25 Jul 2017 17:56:44 +0200 Message-Id: <20170725155644.20214-3-mreitz@redhat.com> In-Reply-To: <20170725155644.20214-1-mreitz@redhat.com> References: <20170725155644.20214-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 25 Jul 2017 15:56:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/2] iotests: Redirect stderr to stdout in 186 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 , qemu-devel@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" Without redirecting qemu's stderr to stdout, _filter_qemu will not apply to warnings. This results in $QEMU_PROG not being replaced by QEMU_PROG which is not great if your qemu executable is not called qemu-system-x86_64 (e.g. qemu-system-i386). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- tests/qemu-iotests/186 | 2 +- tests/qemu-iotests/186.out | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index ab83ee4..2b9f618 100755 --- a/tests/qemu-iotests/186 +++ b/tests/qemu-iotests/186 @@ -56,7 +56,7 @@ function do_run_qemu() done fi echo quit - ) | $QEMU -S -nodefaults -display none -device virtio-scsi-pci -monito= r stdio "$@" + ) | $QEMU -S -nodefaults -display none -device virtio-scsi-pci -monito= r stdio "$@" 2>&1 echo } =20 diff --git a/tests/qemu-iotests/186.out b/tests/qemu-iotests/186.out index b8bf9a2..c8377fe 100644 --- a/tests/qemu-iotests/186.out +++ b/tests/qemu-iotests/186.out @@ -442,28 +442,28 @@ ide0-cd0 (NODE_NAME): null-co:// (null-co, read-only) Cache mode: writeback (qemu) quit =20 -qemu-system-x86_64: -drive if=3Dscsi,driver=3Dnull-co: warning: bus=3D0,un= it=3D0 is deprecated with this machine type Testing: -drive if=3Dscsi,driver=3Dnull-co QEMU X.Y.Z monitor - type 'help' for more information -(qemu) info block +(qemu) QEMU_PROG: -drive if=3Dscsi,driver=3Dnull-co: warning: bus=3D0,unit= =3D0 is deprecated with this machine type +info block scsi0-hd0 (NODE_NAME): null-co:// (null-co) Attached to: /machine/unattached/device[27]/scsi.0/legacy[0] Cache mode: writeback (qemu) quit =20 -qemu-system-x86_64: -drive if=3Dscsi,media=3Dcdrom: warning: bus=3D0,unit= =3D0 is deprecated with this machine type Testing: -drive if=3Dscsi,media=3Dcdrom QEMU X.Y.Z monitor - type 'help' for more information -(qemu) info block +(qemu) QEMU_PROG: -drive if=3Dscsi,media=3Dcdrom: warning: bus=3D0,unit=3D= 0 is deprecated with this machine type +info block scsi0-cd0: [not inserted] Attached to: /machine/unattached/device[27]/scsi.0/legacy[0] Removable device: not locked, tray closed (qemu) quit =20 -qemu-system-x86_64: -drive if=3Dscsi,driver=3Dnull-co,media=3Dcdrom: warni= ng: bus=3D0,unit=3D0 is deprecated with this machine type Testing: -drive if=3Dscsi,driver=3Dnull-co,media=3Dcdrom QEMU X.Y.Z monitor - type 'help' for more information -(qemu) info block +(qemu) QEMU_PROG: -drive if=3Dscsi,driver=3Dnull-co,media=3Dcdrom: warning= : bus=3D0,unit=3D0 is deprecated with this machine type +info block scsi0-cd0 (NODE_NAME): null-co:// (null-co, read-only) Attached to: /machine/unattached/device[27]/scsi.0/legacy[0] Removable device: not locked, tray closed --=20 2.9.4