From nobody Mon Apr 29 10:51:48 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 1501247858964997.5880922905128; Fri, 28 Jul 2017 06:17:38 -0700 (PDT) Received: from localhost ([::1]:48368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db596-0003Bf-JF for importer@patchew.org; Fri, 28 Jul 2017 09:17:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db570-0001SO-Rg for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db56z-0007h9-TZ for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59392) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1db56v-0007bj-Rd; Fri, 28 Jul 2017 09:15:21 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CC13337529B; Fri, 28 Jul 2017 13:15:20 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1585785FB; Fri, 28 Jul 2017 13:15:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CC13337529B Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kwolf@redhat.com From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Jul 2017 15:14:46 +0200 Message-Id: <20170728131452.15316-2-kwolf@redhat.com> In-Reply-To: <20170728131452.15316-1-kwolf@redhat.com> References: <20170728131452.15316-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 28 Jul 2017 13:15:20 +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 for-2.10 1/7] qemu-iotests/041: Fix leaked scratch images 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: kwolf@redhat.com, qemu-devel@nongnu.org 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" qemu-iotests 041 left quorum_snapshot.img and target.img behind in the scratch directory. Make sure to clean up after completing the tests. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- tests/qemu-iotests/041 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 4cda540735..a860a31e9a 100755 --- a/tests/qemu-iotests/041 +++ b/tests/qemu-iotests/041 @@ -418,6 +418,7 @@ new_state =3D "1" def tearDown(self): self.vm.shutdown() os.remove(test_img) + os.remove(target_img) os.remove(backing_img) os.remove(self.blkdebug_file) =20 @@ -568,6 +569,7 @@ new_state =3D "1" def tearDown(self): self.vm.shutdown() os.remove(test_img) + os.remove(target_img) os.remove(backing_img) os.remove(self.blkdebug_file) =20 @@ -821,7 +823,7 @@ class TestRepairQuorum(iotests.QMPTestCase): =20 def tearDown(self): self.vm.shutdown() - for i in self.IMAGES + [ quorum_repair_img ]: + for i in self.IMAGES + [ quorum_repair_img, quorum_snapshot_file ]: # Do a try/except because the test may have deleted some images try: os.remove(i) --=20 2.13.3 From nobody Mon Apr 29 10:51:48 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 1501247850672272.058934917765; Fri, 28 Jul 2017 06:17:30 -0700 (PDT) Received: from localhost ([::1]:48366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db58x-00033b-IS for importer@patchew.org; Fri, 28 Jul 2017 09:17:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db570-0001SJ-IR for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db56z-0007gn-MA for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44424) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1db56x-0007dC-8s; Fri, 28 Jul 2017 09:15:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B806C14B954; Fri, 28 Jul 2017 13:15:22 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22842785FE; Fri, 28 Jul 2017 13:15:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4B806C14B954 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kwolf@redhat.com From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Jul 2017 15:14:47 +0200 Message-Id: <20170728131452.15316-3-kwolf@redhat.com> In-Reply-To: <20170728131452.15316-1-kwolf@redhat.com> References: <20170728131452.15316-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 28 Jul 2017 13:15:22 +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 for-2.10 2/7] qemu-iotests: Remove blkdebug.conf after tests 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: kwolf@redhat.com, qemu-devel@nongnu.org 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" qemu-iotests 074 and 179 left a blkdebug.conf behind the scratch directory. Make sure to clean up after completing the tests. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- tests/qemu-iotests/074 | 1 + tests/qemu-iotests/179 | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/qemu-iotests/074 b/tests/qemu-iotests/074 index aba126cb69..b17866bd34 100755 --- a/tests/qemu-iotests/074 +++ b/tests/qemu-iotests/074 @@ -32,6 +32,7 @@ _cleanup() echo "Cleanup" _cleanup_test_img rm "${TEST_IMG2}" + rm -f "$TEST_DIR/blkdebug.conf" } trap "_cleanup; exit \$status" 0 1 2 3 15 =20 diff --git a/tests/qemu-iotests/179 b/tests/qemu-iotests/179 index 7bc8db8fe0..115944a753 100755 --- a/tests/qemu-iotests/179 +++ b/tests/qemu-iotests/179 @@ -30,6 +30,7 @@ status=3D1 # failure is the default! _cleanup() { _cleanup_test_img + rm -f "$TEST_DIR/blkdebug.conf" } trap "_cleanup; exit \$status" 0 1 2 3 15 =20 --=20 2.13.3 From nobody Mon Apr 29 10:51:48 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 1501247853666797.3113864237187; Fri, 28 Jul 2017 06:17:33 -0700 (PDT) Received: from localhost ([::1]:48367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db592-00037R-38 for importer@patchew.org; Fri, 28 Jul 2017 09:17:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db571-0001TH-F8 for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db570-0007hq-HX for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60270) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1db56y-0007e3-DX; Fri, 28 Jul 2017 09:15:24 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77629C2316F4; Fri, 28 Jul 2017 13:15:23 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9046D78C14; Fri, 28 Jul 2017 13:15:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 77629C2316F4 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kwolf@redhat.com From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Jul 2017 15:14:48 +0200 Message-Id: <20170728131452.15316-4-kwolf@redhat.com> In-Reply-To: <20170728131452.15316-1-kwolf@redhat.com> References: <20170728131452.15316-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 28 Jul 2017 13:15:23 +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 for-2.10 3/7] qemu-iotests/141: Fix image cleanup 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: kwolf@redhat.com, qemu-devel@nongnu.org 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" qemu-iotests 141 attempted to use brace expansion to remove all images with a single command. However, for this to work, the braces shouldn't be quoted. With this fix, the tests correctly cleans up its scratch images. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- tests/qemu-iotests/141 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/141 b/tests/qemu-iotests/141 index 40a3405968..2f9d7b9bc2 100755 --- a/tests/qemu-iotests/141 +++ b/tests/qemu-iotests/141 @@ -31,7 +31,7 @@ _cleanup() { _cleanup_qemu _cleanup_test_img - rm -f "$TEST_DIR/{b,m,o}.$IMGFMT" + rm -f "$TEST_DIR"/{b,m,o}.$IMGFMT } trap "_cleanup; exit \$status" 0 1 2 3 15 =20 --=20 2.13.3 From nobody Mon Apr 29 10:51:48 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 1501248004233677.7665396048707; Fri, 28 Jul 2017 06:20:04 -0700 (PDT) Received: from localhost ([::1]:48375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db5BR-0006BE-UV for importer@patchew.org; Fri, 28 Jul 2017 09:20:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db572-0001Uy-Pq for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db571-0007k0-V9 for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56552) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1db56z-0007fg-Kc; Fri, 28 Jul 2017 09:15:25 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7931FD744; Fri, 28 Jul 2017 13:15:24 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1BC9785FB; Fri, 28 Jul 2017 13:15:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A7931FD744 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kwolf@redhat.com From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Jul 2017 15:14:49 +0200 Message-Id: <20170728131452.15316-5-kwolf@redhat.com> In-Reply-To: <20170728131452.15316-1-kwolf@redhat.com> References: <20170728131452.15316-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 28 Jul 2017 13:15:24 +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 for-2.10 4/7] qemu-iotests/153: Fix leaked scratch images 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: kwolf@redhat.com, qemu-devel@nongnu.org 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" qemu-iotests 153 left t.qcow2.c behind in the scratch directory. Make sure to clean it up after completing the tests. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- tests/qemu-iotests/153 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 index 0b45d78ea3..fa25eb24bd 100755 --- a/tests/qemu-iotests/153 +++ b/tests/qemu-iotests/153 @@ -35,6 +35,7 @@ _cleanup() rm -f "${TEST_IMG}.convert" rm -f "${TEST_IMG}.a" rm -f "${TEST_IMG}.b" + rm -f "${TEST_IMG}.c" rm -f "${TEST_IMG}.lnk" } trap "_cleanup; exit \$status" 0 1 2 3 15 --=20 2.13.3 From nobody Mon Apr 29 10:51:48 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 1501248135809843.3174063606574; Fri, 28 Jul 2017 06:22:15 -0700 (PDT) Received: from localhost ([::1]:48388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db5Da-0008HA-GM for importer@patchew.org; Fri, 28 Jul 2017 09:22:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db573-0001Vs-J6 for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db572-0007ku-J9 for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60358) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1db570-0007hZ-QT; Fri, 28 Jul 2017 09:15:26 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD543C23DFF4; Fri, 28 Jul 2017 13:15:25 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3094785FB; Fri, 28 Jul 2017 13:15:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DD543C23DFF4 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kwolf@redhat.com From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Jul 2017 15:14:50 +0200 Message-Id: <20170728131452.15316-6-kwolf@redhat.com> In-Reply-To: <20170728131452.15316-1-kwolf@redhat.com> References: <20170728131452.15316-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 28 Jul 2017 13:15:26 +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 for-2.10 5/7] qemu-iotests/162: Fix leaked temporary files 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: kwolf@redhat.com, qemu-devel@nongnu.org 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" qemu-iotests 162 left qemu-nbd.pid behind in the scratch directory, and potentially a file called '42' in the current directory. Make sure to clean it up after completing the tests. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- tests/qemu-iotests/162 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/qemu-iotests/162 b/tests/qemu-iotests/162 index cad2bd70ab..477a806360 100755 --- a/tests/qemu-iotests/162 +++ b/tests/qemu-iotests/162 @@ -28,6 +28,13 @@ echo "QA output created by $seq" here=3D"$PWD" status=3D1 # failure is the default! =20 +_cleanup() +{ + rm -f "${TEST_DIR}/qemu-nbd.pid" + rm -f 42 +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + # get standard environment, filters and checks . ./common.rc . ./common.filter --=20 2.13.3 From nobody Mon Apr 29 10:51:48 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 1501247997963533.4147855904022; Fri, 28 Jul 2017 06:19:57 -0700 (PDT) Received: from localhost ([::1]:48374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db5BM-0005zN-LT for importer@patchew.org; Fri, 28 Jul 2017 09:19:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db574-0001XN-Kn for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db573-0007mF-To for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50097) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1db572-0007j4-2M; Fri, 28 Jul 2017 09:15:28 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 22ADEFA147; Fri, 28 Jul 2017 13:15:27 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3030E785FB; Fri, 28 Jul 2017 13:15:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 22ADEFA147 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kwolf@redhat.com From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Jul 2017 15:14:51 +0200 Message-Id: <20170728131452.15316-7-kwolf@redhat.com> In-Reply-To: <20170728131452.15316-1-kwolf@redhat.com> References: <20170728131452.15316-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 28 Jul 2017 13:15:27 +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 for-2.10 6/7] qemu-iotests/063: Fix leaked image 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: kwolf@redhat.com, qemu-devel@nongnu.org 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" qemu-iotests 063 left t.raw.raw1 behind in the scratch directory because it used the wrong suffix. Make sure to clean it up after completing the test. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- tests/qemu-iotests/063 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/qemu-iotests/063 b/tests/qemu-iotests/063 index 352e78c778..e4f6ea9385 100755 --- a/tests/qemu-iotests/063 +++ b/tests/qemu-iotests/063 @@ -31,7 +31,7 @@ status=3D1 # failure is the default! _cleanup() { _cleanup_test_img - rm -f "$TEST_IMG.orig" "$TEST_IMG.raw" "$TEST_IMG.raw2" + rm -f "$TEST_IMG.orig" "$TEST_IMG.raw1" "$TEST_IMG.raw2" } trap "_cleanup; exit \$status" 0 1 2 3 15 =20 @@ -91,8 +91,6 @@ if $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n "$TEST_IMG.= orig" "$TEST_IMG" >/dev exit 1 fi =20 -rm -f "$TEST_IMG.orig" "$TEST_IMG.raw" "$TEST_IMG.raw2" - echo "*** done" rm -f $seq.full status=3D0 --=20 2.13.3 From nobody Mon Apr 29 10:51:48 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 1501248015561958.6887166118025; Fri, 28 Jul 2017 06:20:15 -0700 (PDT) Received: from localhost ([::1]:48376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db5Bd-0006Vg-1k for importer@patchew.org; Fri, 28 Jul 2017 09:20:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db579-0001dk-U7 for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db578-0007qb-Fn for qemu-devel@nongnu.org; Fri, 28 Jul 2017 09:15:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35848) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1db573-0007l0-Ah; Fri, 28 Jul 2017 09:15:29 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 55ACECB870; Fri, 28 Jul 2017 13:15:28 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64DF878DD7; Fri, 28 Jul 2017 13:15:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 55ACECB870 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=fail smtp.mailfrom=kwolf@redhat.com From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 28 Jul 2017 15:14:52 +0200 Message-Id: <20170728131452.15316-8-kwolf@redhat.com> In-Reply-To: <20170728131452.15316-1-kwolf@redhat.com> References: <20170728131452.15316-1-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 28 Jul 2017 13:15:28 +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 for-2.10 7/7] qemu-iotests/059: Fix leaked image files 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: kwolf@redhat.com, qemu-devel@nongnu.org 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" qemu-iotests 059 left a whole lot of image files behind in the scratch directory because VMDK creates additional files for extents and cleaning them up requires the original image intact (it parses qemu-img info output to find all extent files), but the image overwrote it many times like it works for all other image formats. In addition, _use_sample_img overwrites the TEST_IMG variable, causing new images created afterwards to reuse the name of the sample file rather than the usual t.IMGFMT. This patch adds an intermediate _cleanup_test_img after each subtest that created an image file with additional extent files, and also after each use of a sample image. _cleanup_test_img is also changed so that it resets TEST_IMG after a sample image is cleaned up. Note that this test was failing before this commit and continues to do so after it. This failure was introduced in commit 9877860 ('block/vmdk: Report failures in vmdk_read_cid()') and needs to be dealt with separately. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- tests/qemu-iotests/059 | 9 +++++++++ tests/qemu-iotests/059.out | 22 +++++++++++----------- tests/qemu-iotests/common.rc | 3 +++ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 index 6655aaf384..32d6e6791c 100755 --- a/tests/qemu-iotests/059 +++ b/tests/qemu-iotests/059 @@ -30,6 +30,7 @@ status=3D1 # failure is the default! _cleanup() { _cleanup_test_img + rm -f "$TEST_IMG.qcow2" } trap "_cleanup; exit \$status" 0 1 2 3 15 =20 @@ -72,15 +73,18 @@ echo echo "=3D=3D=3D Testing monolithicFlat creation and opening =3D=3D=3D" IMGOPTS=3D"subformat=3DmonolithicFlat" _make_test_img 2G _img_info +_cleanup_test_img =20 echo echo "=3D=3D=3D Testing monolithicFlat with zeroed_grain =3D=3D=3D" IMGOPTS=3D"subformat=3DmonolithicFlat,zeroed_grain=3Don" _make_test_img 2G +_cleanup_test_img =20 echo echo "=3D=3D=3D Testing big twoGbMaxExtentFlat =3D=3D=3D" IMGOPTS=3D"subformat=3DtwoGbMaxExtentFlat" _make_test_img 1000G $QEMU_IMG info $TEST_IMG | _filter_testdir | sed -e 's/cid: [0-9]*/cid: XX= XXXXXX/' +_cleanup_test_img =20 echo echo "=3D=3D=3D Testing malformed VMFS extent description line =3D=3D=3D" @@ -114,6 +118,7 @@ echo "=3D=3D=3D Testing monolithicFlat with internally = generated JSON file name =3D=3D=3D" IMGOPTS=3D"subformat=3DmonolithicFlat" _make_test_img 64M $QEMU_IO -c "open -o driver=3D$IMGFMT,file.driver=3Dblkdebug,file.image.fi= lename=3D$TEST_IMG,file.inject-error.0.event=3Dread_aio" 2>&1 \ | _filter_testdir | _filter_imgfmt +_cleanup_test_img =20 echo echo "=3D=3D=3D Testing version 3 =3D=3D=3D" @@ -123,6 +128,7 @@ for i in {0..99}; do $QEMU_IO -r -c "read -P $(( i % 10 + 0x30 )) $(( i * 64 * 1024 * 10 + = i * 512 )) 512" $TEST_IMG \ | _filter_qemu_io done +_cleanup_test_img =20 echo echo "=3D=3D=3D Testing 4TB monolithicFlat creation and IO =3D=3D=3D" @@ -130,6 +136,7 @@ IMGOPTS=3D"subformat=3DmonolithicFlat" _make_test_img 4T _img_info $QEMU_IO -c "write -P 0xa 900G 512" "$TEST_IMG" | _filter_qemu_io $QEMU_IO -c "read -v 900G 1024" "$TEST_IMG" | _filter_qemu_io +_cleanup_test_img =20 echo echo "=3D=3D=3D Testing qemu-img map on extents =3D=3D=3D" @@ -139,12 +146,14 @@ for fmt in monolithicSparse twoGbMaxExtentSparse; do $QEMU_IO -c "write 2147483136 1k" "$TEST_IMG" | _filter_qemu_io $QEMU_IO -c "write 5G 1k" "$TEST_IMG" | _filter_qemu_io $QEMU_IMG map "$TEST_IMG" | _filter_testdir + _cleanup_test_img done =20 echo echo "=3D=3D=3D Testing afl image with a very large capacity =3D=3D=3D" _use_sample_img afl9.vmdk.bz2 _img_info +_cleanup_test_img =20 # success, all done echo "*** done" diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out index 6154509bc3..f6dce7947c 100644 --- a/tests/qemu-iotests/059.out +++ b/tests/qemu-iotests/059.out @@ -2259,8 +2259,8 @@ read 512/512 bytes at offset 64931328 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) =20 =3D=3D=3D Testing 4TB monolithicFlat creation and IO =3D=3D=3D -Formatting 'TEST_DIR/iotest-version3.IMGFMT', fmt=3DIMGFMT size=3D43980465= 11104 subformat=3DmonolithicFlat -image: TEST_DIR/iotest-version3.IMGFMT +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D4398046511104 subforma= t=3DmonolithicFlat +image: TEST_DIR/t.IMGFMT file format: IMGFMT virtual size: 4.0T (4398046511104 bytes) wrote 512/512 bytes at offset 966367641600 @@ -2333,7 +2333,7 @@ read 1024/1024 bytes at offset 966367641600 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) =20 =3D=3D=3D Testing qemu-img map on extents =3D=3D=3D -Formatting 'TEST_DIR/iotest-version3.IMGFMT', fmt=3DIMGFMT size=3D33285996= 544 subformat=3DmonolithicSparse +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D33285996544 subformat= =3DmonolithicSparse wrote 1024/1024 bytes at offset 65024 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 1024/1024 bytes at offset 2147483136 @@ -2341,10 +2341,10 @@ wrote 1024/1024 bytes at offset 2147483136 wrote 1024/1024 bytes at offset 5368709120 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Offset Length Mapped to File -0 0x20000 0x3f0000 TEST_DIR/iotest-version3.v= mdk -0x7fff0000 0x20000 0x410000 TEST_DIR/iotest-version3.v= mdk -0x140000000 0x10000 0x430000 TEST_DIR/iotest-version3.v= mdk -Formatting 'TEST_DIR/iotest-version3.IMGFMT', fmt=3DIMGFMT size=3D33285996= 544 subformat=3DtwoGbMaxExtentSparse +0 0x20000 0x3f0000 TEST_DIR/t.vmdk +0x7fff0000 0x20000 0x410000 TEST_DIR/t.vmdk +0x140000000 0x10000 0x430000 TEST_DIR/t.vmdk +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D33285996544 subformat= =3DtwoGbMaxExtentSparse wrote 1024/1024 bytes at offset 65024 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 1024/1024 bytes at offset 2147483136 @@ -2352,10 +2352,10 @@ wrote 1024/1024 bytes at offset 2147483136 wrote 1024/1024 bytes at offset 5368709120 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Offset Length Mapped to File -0 0x20000 0x50000 TEST_DIR/iotest-version3-s= 001.vmdk -0x7fff0000 0x10000 0x70000 TEST_DIR/iotest-version3-s= 001.vmdk -0x80000000 0x10000 0x50000 TEST_DIR/iotest-version3-s= 002.vmdk -0x140000000 0x10000 0x50000 TEST_DIR/iotest-version3-s= 003.vmdk +0 0x20000 0x50000 TEST_DIR/t-s001.vmdk +0x7fff0000 0x10000 0x70000 TEST_DIR/t-s001.vmdk +0x80000000 0x10000 0x50000 TEST_DIR/t-s002.vmdk +0x140000000 0x10000 0x50000 TEST_DIR/t-s003.vmdk =20 =3D=3D=3D Testing afl image with a very large capacity =3D=3D=3D qemu-img: Can't get image size 'TEST_DIR/afl9.IMGFMT': File too large diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 2548e58b99..bfbc80e5f6 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -92,6 +92,7 @@ else TEST_IMG=3D$IMGPROTO:$TEST_DIR/t.$IMGFMT fi fi +ORIG_TEST_IMG=3D"$TEST_IMG" =20 _optstr_add() { @@ -228,6 +229,8 @@ _cleanup_test_img() if [ -n "$SAMPLE_IMG_FILE" ] then rm -f "$TEST_DIR/$SAMPLE_IMG_FILE" + SAMPLE_IMG_FILE=3D + TEST_IMG=3D"$ORIG_TEST_IMG" fi ;; =20 --=20 2.13.3