From nobody Sun May 5 17:24:21 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 1511403066436556.4762541393944; Wed, 22 Nov 2017 18:11:06 -0800 (PST) Received: from localhost ([::1]:42117 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgyb-0005i3-VY for importer@patchew.org; Wed, 22 Nov 2017 21:10:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgwc-0004Xs-R4 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:08:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgwc-0001AU-0m for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:08:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37354) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgwZ-000190-VW; Wed, 22 Nov 2017 21:08:48 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4461F72D0F; Thu, 23 Nov 2017 02:08:47 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1F45E5D6A5; Thu, 23 Nov 2017 02:08:42 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:16 +0100 Message-Id: <20171123020832.8165-2-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 23 Nov 2017 02:08:47 +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 01/17] block/vmdk: Fix , instead of ; at end of line 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 , Fam Zheng , John Snow , 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" Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Fam Zheng --- block/vmdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vmdk.c b/block/vmdk.c index c665bcc977..1ae47b1c2e 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1398,7 +1398,7 @@ static int vmdk_write_extent(VmdkExtent *extent, int6= 4_t cluster_offset, qemu_iovec_concat(&local_qiov, qiov, qiov_offset, n_bytes); } =20 - write_offset =3D cluster_offset + offset_in_cluster, + write_offset =3D cluster_offset + offset_in_cluster; ret =3D bdrv_co_pwritev(extent->file, write_offset, n_bytes, &local_qiov, 0); =20 --=20 2.13.6 From nobody Sun May 5 17:24:21 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 1511403079301862.5195857675909; Wed, 22 Nov 2017 18:11:19 -0800 (PST) Received: from localhost ([::1]:42118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgz0-000643-G6 for importer@patchew.org; Wed, 22 Nov 2017 21:11:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgwm-0004fb-H2 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgwl-0001Fq-KV for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39058) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgwh-0001D5-31; Wed, 22 Nov 2017 21:08:55 -0500 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 39E2B5D5EB; Thu, 23 Nov 2017 02:08:54 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 727A061982; Thu, 23 Nov 2017 02:08:49 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:17 +0100 Message-Id: <20171123020832.8165-3-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@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.39]); Thu, 23 Nov 2017 02:08:54 +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 02/17] qcow2: No persistent dirty bitmaps for compat=0.10 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 , Fam Zheng , John Snow , 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" Persistent dirty bitmaps require a properly functioning autoclear_features field, or we cannot track when an unsupporting program might overwrite them. Therefore, we cannot support them for compat=3D0.10 images. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-bitmap.c | 10 ++++++++++ block/qcow2.c | 14 +++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index f45e46cfbd..efa10c6663 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -1449,6 +1449,16 @@ bool qcow2_can_store_new_dirty_bitmap(BlockDriverSta= te *bs, bool found; Qcow2BitmapList *bm_list; =20 + if (s->qcow_version < 3) { + /* Without autoclear_features, we would always have to assume + * that a program without persistent dirty bitmap support has + * accessed this qcow2 file when opening it, and would thus + * have to drop all dirty bitmaps (defeating their purpose). + */ + error_setg(errp, "Cannot store dirty bitmaps in qcow2 v2 files"); + goto fail; + } + if (check_constraints_on_bitmap(bs, name, granularity, errp) !=3D 0) { goto fail; } diff --git a/block/qcow2.c b/block/qcow2.c index 1914a940e5..cabf93e43c 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -302,9 +302,17 @@ static int qcow2_read_extensions(BlockDriverState *bs,= uint64_t start_offset, } =20 if (!(s->autoclear_features & QCOW2_AUTOCLEAR_BITMAPS)) { - warn_report("a program lacking bitmap support " - "modified this file, so all bitmaps are now " - "considered inconsistent"); + if (s->qcow_version < 3) { + /* Let's be a bit more specific */ + warn_report("This qcow2 v2 image contains bitmaps, but= " + "they may have been modified by a program " + "without persistent bitmap support; so now= " + "they must all be considered inconsistent"= ); + } else { + warn_report("a program lacking bitmap support " + "modified this file, so all bitmaps are no= w " + "considered inconsistent"); + } error_printf("Some clusters may be leaked, " "run 'qemu-img check -r' on the image " "file to fix."); --=20 2.13.6 From nobody Sun May 5 17:24:21 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 1511403223222454.81183631903446; Wed, 22 Nov 2017 18:13:43 -0800 (PST) Received: from localhost ([::1]:42134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh1I-0008Ox-EN for importer@patchew.org; Wed, 22 Nov 2017 21:13:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgwu-0004m7-42 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgwq-0001L4-Uu for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24075) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgwo-0001Hh-38; Wed, 22 Nov 2017 21:09:02 -0500 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 5FBAA7E422; Thu, 23 Nov 2017 02:09:01 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C2B35D960; Thu, 23 Nov 2017 02:08:56 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:18 +0100 Message-Id: <20171123020832.8165-4-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-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.27]); Thu, 23 Nov 2017 02:09:01 +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 03/17] block/qcow: Add blkdebug events 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 , Fam Zheng , John Snow , 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" This is not necessarily complete, but it should include the most important places. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/block/qcow.c b/block/qcow.c index 9569deeaf0..d552a6eba8 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -379,6 +379,7 @@ static int get_cluster_offset(BlockDriverState *bs, /* update the L1 entry */ s->l1_table[l1_index] =3D l2_offset; tmp =3D cpu_to_be64(l2_offset); + BLKDBG_EVENT(bs->file, BLKDBG_L1_UPDATE); ret =3D bdrv_pwrite_sync(bs->file, s->l1_table_offset + l1_index * sizeof(tmp), &tmp, sizeof(tmp)); @@ -409,6 +410,7 @@ static int get_cluster_offset(BlockDriverState *bs, } } l2_table =3D s->l2_cache + (min_index << s->l2_bits); + BLKDBG_EVENT(bs->file, BLKDBG_L2_LOAD); if (new_l2_table) { memset(l2_table, 0, s->l2_size * sizeof(uint64_t)); ret =3D bdrv_pwrite_sync(bs->file, l2_offset, l2_table, @@ -432,6 +434,7 @@ static int get_cluster_offset(BlockDriverState *bs, ((cluster_offset & QCOW_OFLAG_COMPRESSED) && allocate =3D=3D 1)) { if (!allocate) return 0; + BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC); /* allocate a new cluster */ if ((cluster_offset & QCOW_OFLAG_COMPRESSED) && (n_end - n_start) < s->cluster_sectors) { @@ -447,6 +450,7 @@ static int get_cluster_offset(BlockDriverState *bs, } cluster_offset =3D QEMU_ALIGN_UP(cluster_offset, s->cluster_si= ze); /* write the cluster content */ + BLKDBG_EVENT(bs->file, BLKDBG_WRITE_AIO); ret =3D bdrv_pwrite(bs->file, cluster_offset, s->cluster_cache, s->cluster_size); if (ret < 0) { @@ -486,6 +490,7 @@ static int get_cluster_offset(BlockDriverState *bs, NULL) < 0) { return -EIO; } + BLKDBG_EVENT(bs->file, BLKDBG_WRITE_AIO); ret =3D bdrv_pwrite(bs->file, cluster_offset + i * 512, s->cluster_data, 512); @@ -503,6 +508,11 @@ static int get_cluster_offset(BlockDriverState *bs, /* update L2 table */ tmp =3D cpu_to_be64(cluster_offset); l2_table[l2_index] =3D tmp; + if (allocate =3D=3D 2) { + BLKDBG_EVENT(bs->file, BLKDBG_L2_UPDATE_COMPRESSED); + } else { + BLKDBG_EVENT(bs->file, BLKDBG_L2_UPDATE); + } ret =3D bdrv_pwrite_sync(bs->file, l2_offset + l2_index * sizeof(t= mp), &tmp, sizeof(tmp)); if (ret < 0) { @@ -579,6 +589,7 @@ static int decompress_cluster(BlockDriverState *bs, uin= t64_t cluster_offset) if (s->cluster_cache_offset !=3D coffset) { csize =3D cluster_offset >> (63 - s->cluster_bits); csize &=3D (s->cluster_size - 1); + BLKDBG_EVENT(bs->file, BLKDBG_READ_COMPRESSED); ret =3D bdrv_pread(bs->file, coffset, s->cluster_data, csize); if (ret !=3D csize) return -1; @@ -635,6 +646,8 @@ static coroutine_fn int qcow_co_readv(BlockDriverState = *bs, int64_t sector_num, hd_iov.iov_len =3D n * 512; qemu_iovec_init_external(&hd_qiov, &hd_iov, 1); qemu_co_mutex_unlock(&s->lock); + /* qcow2 emits this on bs->file instead of bs->backing */ + BLKDBG_EVENT(bs->file, BLKDBG_READ_BACKING_AIO); ret =3D bdrv_co_readv(bs->backing, sector_num, n, &hd_qiov= ); qemu_co_mutex_lock(&s->lock); if (ret < 0) { @@ -661,6 +674,7 @@ static coroutine_fn int qcow_co_readv(BlockDriverState = *bs, int64_t sector_num, hd_iov.iov_len =3D n * 512; qemu_iovec_init_external(&hd_qiov, &hd_iov, 1); qemu_co_mutex_unlock(&s->lock); + BLKDBG_EVENT(bs->file, BLKDBG_READ_AIO); ret =3D bdrv_co_readv(bs->file, (cluster_offset >> 9) + index_in_cluster, n, &hd_qiov); @@ -754,6 +768,7 @@ static coroutine_fn int qcow_co_writev(BlockDriverState= *bs, int64_t sector_num, hd_iov.iov_len =3D n * 512; qemu_iovec_init_external(&hd_qiov, &hd_iov, 1); qemu_co_mutex_unlock(&s->lock); + BLKDBG_EVENT(bs->file, BLKDBG_WRITE_AIO); ret =3D bdrv_co_writev(bs->file, (cluster_offset >> 9) + index_in_cluster, n, &hd_qiov); @@ -1048,6 +1063,7 @@ qcow_co_pwritev_compressed(BlockDriverState *bs, uint= 64_t offset, .iov_len =3D out_len, }; qemu_iovec_init_external(&hd_qiov, &iov, 1); + BLKDBG_EVENT(bs->file, BLKDBG_WRITE_COMPRESSED); ret =3D bdrv_co_pwritev(bs->file, cluster_offset, out_len, &hd_qiov, 0= ); if (ret < 0) { goto fail; --=20 2.13.6 From nobody Sun May 5 17:24:21 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 1511403267581632.8900394050287; Wed, 22 Nov 2017 18:14:27 -0800 (PST) Received: from localhost ([::1]:42136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh22-0000ZB-Qc for importer@patchew.org; Wed, 22 Nov 2017 21:14:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgww-0004nc-NP for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgwv-0001Nm-J5 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38066) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgwq-0001KW-Jp; Wed, 22 Nov 2017 21:09:04 -0500 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 CA23981DED; Thu, 23 Nov 2017 02:09:03 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 58F065D960; Thu, 23 Nov 2017 02:09:03 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:19 +0100 Message-Id: <20171123020832.8165-5-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-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.25]); Thu, 23 Nov 2017 02:09:03 +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 04/17] block/vmdk: Add blkdebug events 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 , Fam Zheng , John Snow , 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" This is certainly not complete, but it includes at least write_aio and read_aio. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng --- block/vmdk.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/block/vmdk.c b/block/vmdk.c index 1ae47b1c2e..d71cec4f31 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1075,6 +1075,8 @@ static int get_whole_cluster(BlockDriverState *bs, /* Read backing data before skip range */ if (skip_start_bytes > 0) { if (bs->backing) { + /* qcow2 emits this on bs->file instead of bs->backing */ + BLKDBG_EVENT(extent->file, BLKDBG_COW_READ); ret =3D bdrv_pread(bs->backing, offset, whole_grain, skip_start_bytes); if (ret < 0) { @@ -1082,6 +1084,7 @@ static int get_whole_cluster(BlockDriverState *bs, goto exit; } } + BLKDBG_EVENT(extent->file, BLKDBG_COW_WRITE); ret =3D bdrv_pwrite(extent->file, cluster_offset, whole_grain, skip_start_bytes); if (ret < 0) { @@ -1092,6 +1095,8 @@ static int get_whole_cluster(BlockDriverState *bs, /* Read backing data after skip range */ if (skip_end_bytes < cluster_bytes) { if (bs->backing) { + /* qcow2 emits this on bs->file instead of bs->backing */ + BLKDBG_EVENT(extent->file, BLKDBG_COW_READ); ret =3D bdrv_pread(bs->backing, offset + skip_end_bytes, whole_grain + skip_end_bytes, cluster_bytes - skip_end_bytes); @@ -1100,6 +1105,7 @@ static int get_whole_cluster(BlockDriverState *bs, goto exit; } } + BLKDBG_EVENT(extent->file, BLKDBG_COW_WRITE); ret =3D bdrv_pwrite(extent->file, cluster_offset + skip_end_bytes, whole_grain + skip_end_bytes, cluster_bytes - skip_end_bytes); @@ -1120,6 +1126,7 @@ static int vmdk_L2update(VmdkExtent *extent, VmdkMeta= Data *m_data, { offset =3D cpu_to_le32(offset); /* update L2 table */ + BLKDBG_EVENT(extent->file, BLKDBG_L2_UPDATE); if (bdrv_pwrite_sync(extent->file, ((int64_t)m_data->l2_offset * 512) + (m_data->l2_index * sizeof(offset)), @@ -1218,6 +1225,7 @@ static int get_cluster_offset(BlockDriverState *bs, } } l2_table =3D extent->l2_cache + (min_index * extent->l2_size); + BLKDBG_EVENT(extent->file, BLKDBG_L2_LOAD); if (bdrv_pread(extent->file, (int64_t)l2_offset * 512, l2_table, @@ -1393,9 +1401,13 @@ static int vmdk_write_extent(VmdkExtent *extent, int= 64_t cluster_offset, .iov_len =3D n_bytes, }; qemu_iovec_init_external(&local_qiov, &iov, 1); + + BLKDBG_EVENT(extent->file, BLKDBG_WRITE_COMPRESSED); } else { qemu_iovec_init(&local_qiov, qiov->niov); qemu_iovec_concat(&local_qiov, qiov, qiov_offset, n_bytes); + + BLKDBG_EVENT(extent->file, BLKDBG_WRITE_AIO); } =20 write_offset =3D cluster_offset + offset_in_cluster; @@ -1437,6 +1449,7 @@ static int vmdk_read_extent(VmdkExtent *extent, int64= _t cluster_offset, =20 =20 if (!extent->compressed) { + BLKDBG_EVENT(extent->file, BLKDBG_READ_AIO); ret =3D bdrv_co_preadv(extent->file, cluster_offset + offset_in_cluster, bytes, qiov, 0); @@ -1450,6 +1463,7 @@ static int vmdk_read_extent(VmdkExtent *extent, int64= _t cluster_offset, buf_bytes =3D cluster_bytes * 2; cluster_buf =3D g_malloc(buf_bytes); uncomp_buf =3D g_malloc(cluster_bytes); + BLKDBG_EVENT(extent->file, BLKDBG_READ_COMPRESSED); ret =3D bdrv_pread(extent->file, cluster_offset, cluster_buf, buf_bytes); @@ -1527,6 +1541,8 @@ vmdk_co_preadv(BlockDriverState *bs, uint64_t offset,= uint64_t bytes, qemu_iovec_reset(&local_qiov); qemu_iovec_concat(&local_qiov, qiov, bytes_done, n_bytes); =20 + /* qcow2 emits this on bs->file instead of bs->backing */ + BLKDBG_EVENT(bs->file, BLKDBG_READ_BACKING_AIO); ret =3D bdrv_co_preadv(bs->backing, offset, n_bytes, &local_qiov, 0); if (ret < 0) { --=20 2.13.6 From nobody Sun May 5 17:24:21 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511403393576512.8552254788319; Wed, 22 Nov 2017 18:16:33 -0800 (PST) Received: from localhost ([::1]:42155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh3x-0002FD-HN for importer@patchew.org; Wed, 22 Nov 2017 21:16:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgx3-0004r7-9A for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgx0-0001R2-1r for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37504) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgwx-0001Ok-Nq; Wed, 22 Nov 2017 21:09:11 -0500 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 ED68D804E3; Thu, 23 Nov 2017 02:09:10 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4C8C60851; Thu, 23 Nov 2017 02:09:05 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:20 +0100 Message-Id: <20171123020832.8165-6-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-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.27]); Thu, 23 Nov 2017 02:09:11 +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 05/17] iotests: Fix _img_info for backslashes 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 , Fam Zheng , John Snow , 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" read without -r eats backslashes. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng --- tests/qemu-iotests/common.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index dbae7d74ba..6fa0495e10 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -338,7 +338,7 @@ _img_info() -e "s#$IMGFMT#IMGFMT#g" \ -e "/^disk size:/ D" \ -e "/actual-size/ D" | \ - while IFS=3D'' read line; do + while IFS=3D'' read -r line; do if [[ $format_specific =3D=3D 1 ]]; then discard=3D0 elif [[ $line =3D=3D "Format specific information:" ]]; then --=20 2.13.6 From nobody Sun May 5 17:24:21 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511403455125483.7549875381666; Wed, 22 Nov 2017 18:17:35 -0800 (PST) Received: from localhost ([::1]:42157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh4z-0003TR-Bn for importer@patchew.org; Wed, 22 Nov 2017 21:17:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgx9-0004wV-1D for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgx8-0001Xq-06 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38122) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgx5-0001Tj-6E; Wed, 22 Nov 2017 21:09:19 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6B69B8535D; Thu, 23 Nov 2017 02:09:18 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E08C56055F; Thu, 23 Nov 2017 02:09:12 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:21 +0100 Message-Id: <20171123020832.8165-7-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 23 Nov 2017 02:09:18 +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 06/17] iotests: Drop format-specific in _filter_img_info 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 , Fam Zheng , John Snow , 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" _filter_img_info should remove format-specific information, too. We already have such a filter in _img_info, and it is very useful for query-block-named-block-nodes (etc.), too. However, in 198 we need that information (but we still want the rest of the filter), so make that filtering optional. Note that "the rest of the filter" includes filtering of the test directory, so we can drop the _filter_testdir from 198 at the same time. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Fam Zheng --- tests/qemu-iotests/198 | 6 ++++-- tests/qemu-iotests/common.filter | 29 ++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/198 b/tests/qemu-iotests/198 index 34ef666381..a84a058396 100755 --- a/tests/qemu-iotests/198 +++ b/tests/qemu-iotests/198 @@ -91,11 +91,13 @@ $QEMU_IO --object $SECRET0 --object $SECRET1 -c "read -= P 0x9 0 $size" --image-op =20 echo echo "=3D=3D checking image base =3D=3D" -$QEMU_IMG info --image-opts $IMGSPECBASE | _filter_img_info | _filter_test= dir | sed -e "/^disk size:/ D" +$QEMU_IMG info --image-opts $IMGSPECBASE | _filter_img_info --format-speci= fic \ + | sed -e "/^disk size:/ D" =20 echo echo "=3D=3D checking image layer =3D=3D" -$QEMU_IMG info --image-opts $IMGSPECLAYER | _filter_img_info | _filter_tes= tdir | sed -e "/^disk size:/ D" +$QEMU_IMG info --image-opts $IMGSPECLAYER | _filter_img_info --format-spec= ific \ + | sed -e "/^disk size:/ D" =20 =20 # success, all done diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.f= ilter index d9237799e9..0c0e53fae7 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -139,6 +139,15 @@ _filter_img_create() =20 _filter_img_info() { + if [[ "$1" =3D=3D "--format-specific" ]]; then + local format_specific=3D1 + shift + else + local format_specific=3D0 + fi + + discard=3D0 + regex_json_spec_start=3D'^ *"format-specific": \{' sed -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" \ -e "s#$TEST_DIR#TEST_DIR#g" \ -e "s#$IMGFMT#IMGFMT#g" \ @@ -159,7 +168,25 @@ _filter_img_info() -e "/block_state_zero: \\(on\\|off\\)/d" \ -e "/log_size: [0-9]\\+/d" \ -e "s/iters: [0-9]\\+/iters: 1024/" \ - -e "s/uuid: [-a-f0-9]\\+/uuid: 00000000-0000-0000-0000-00000000000= 0/" + -e "s/uuid: [-a-f0-9]\\+/uuid: 00000000-0000-0000-0000-00000000000= 0/" | \ + while IFS=3D'' read -r line; do + if [[ $format_specific =3D=3D 1 ]]; then + discard=3D0 + elif [[ $line =3D=3D "Format specific information:" ]]; then + discard=3D1 + elif [[ $line =3D~ $regex_json_spec_start ]]; then + discard=3D2 + regex_json_spec_end=3D"^${line%%[^ ]*}\\},? *$" + fi + if [[ $discard =3D=3D 0 ]]; then + echo "$line" + elif [[ $discard =3D=3D 1 && ! $line ]]; then + echo + discard=3D0 + elif [[ $discard =3D=3D 2 && $line =3D~ $regex_json_spec_end ]]; t= hen + discard=3D0 + fi + done } =20 # filter out offsets and file names from qemu-img map; good for both --=20 2.13.6 From nobody Sun May 5 17:24:21 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511403105971614.1424038289932; Wed, 22 Nov 2017 18:11:45 -0800 (PST) Received: from localhost ([::1]:42119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgzM-0006NR-4D for importer@patchew.org; Wed, 22 Nov 2017 21:11:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxD-0004yp-VX for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxD-0001cT-33 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55640) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgx7-0001XK-Sh; Wed, 22 Nov 2017 21:09:22 -0500 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 2620885550; Thu, 23 Nov 2017 02:09:21 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC35D60851; Thu, 23 Nov 2017 02:09:20 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:22 +0100 Message-Id: <20171123020832.8165-8-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-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.28]); Thu, 23 Nov 2017 02:09:21 +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 07/17] iotests: Forbid 020 for non-file protocols 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 , Fam Zheng , John Snow , 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" This test does funny things like TEST_IMG=3D"TEST_IMG.base" _make_test_img that usually only work with the file protocol. More specifically, they do not work with the most interesting non-file protocols, so we might as well skip this for anything but file. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng --- tests/qemu-iotests/020 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020 index cefe3a830e..d22ab81414 100755 --- a/tests/qemu-iotests/020 +++ b/tests/qemu-iotests/020 @@ -42,18 +42,12 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 =20 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed -_supported_proto generic -_unsupported_proto vxhs +_supported_proto file _supported_os Linux _unsupported_imgopts "subformat=3DmonolithicFlat" \ "subformat=3DtwoGbMaxExtentFlat" \ "subformat=3DtwoGbMaxExtentSparse" =20 -# NFS does not support bdrv_reopen_prepare thus qemu-img commit fails. -if [ "$IMGPROTO" =3D "nfs" ]; then - _notrun "image protocol $IMGPROTO does not support bdrv_commit" -fi - TEST_OFFSETS=3D"0 4294967296" =20 TEST_IMG_SAVE=3D"$TEST_IMG" --=20 2.13.6 From nobody Sun May 5 17:24:21 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 151140355817851.703823903595094; Wed, 22 Nov 2017 18:19:18 -0800 (PST) Received: from localhost ([::1]:42171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh6h-0004u5-8x for importer@patchew.org; Wed, 22 Nov 2017 21:19:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxE-0004z9-8T for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxD-0001dD-Ek for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24070) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxA-0001ZD-AO; Wed, 22 Nov 2017 21:09:24 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8D83A1555A; Thu, 23 Nov 2017 02:09:23 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 204046055F; Thu, 23 Nov 2017 02:09:22 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:23 +0100 Message-Id: <20171123020832.8165-9-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 23 Nov 2017 02:09: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 08/17] iotests: Skip 103 for refcount_bits=1 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 , Fam Zheng , John Snow , 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" Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/103 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103 index ecbd8ebd71..d0cfab8844 100755 --- a/tests/qemu-iotests/103 +++ b/tests/qemu-iotests/103 @@ -40,6 +40,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file nfs _supported_os Linux +# Internal snapshots are (currently) impossible with refcount_bits=3D1 +_unsupported_imgopts 'refcount_bits=3D1[^0-9]' =20 IMG_SIZE=3D64K =20 --=20 2.13.6 From nobody Sun May 5 17:24:21 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511403243619526.211722511633; Wed, 22 Nov 2017 18:14:03 -0800 (PST) Received: from localhost ([::1]:42135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh1Z-0000AL-M3 for importer@patchew.org; Wed, 22 Nov 2017 21:13:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxP-00059l-Cy for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxJ-0001ih-8B for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50592) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxG-0001gj-G3; Wed, 22 Nov 2017 21:09:30 -0500 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 B1E5CC047B66; Thu, 23 Nov 2017 02:09:29 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8909C61982; Thu, 23 Nov 2017 02:09:25 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:24 +0100 Message-Id: <20171123020832.8165-10-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@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]); Thu, 23 Nov 2017 02:09:29 +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 09/17] iotests: Disable some tests for compat=0.10 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 , Fam Zheng , John Snow , 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" Tests 080, 130, 137, and 176 simply do not work with compat=3D0.10 for the reasons stated there. 177 is a bit more interesting: Originally, it was actually very much intended to work with compat=3D0.10 (it even had a special case for that). However, it now prints the test image's map twice, and short of just not doing that, there is no solution I can imagine that is both simple and would leave compat=3D0.10 support intact. Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/080 | 5 +++-- tests/qemu-iotests/130 | 2 ++ tests/qemu-iotests/137 | 2 ++ tests/qemu-iotests/176 | 2 ++ tests/qemu-iotests/177 | 13 +++---------- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/qemu-iotests/080 b/tests/qemu-iotests/080 index 55044c700b..1c2bd85742 100755 --- a/tests/qemu-iotests/080 +++ b/tests/qemu-iotests/080 @@ -41,8 +41,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file _supported_os Linux -# Internal snapshots are (currently) impossible with refcount_bits=3D1 -_unsupported_imgopts 'refcount_bits=3D1[^0-9]' +# - Internal snapshots are (currently) impossible with refcount_bits=3D1 +# - This is generally a test for compat=3D1.1 images +_unsupported_imgopts 'refcount_bits=3D1[^0-9]' 'compat=3D0.10' =20 header_size=3D104 =20 diff --git a/tests/qemu-iotests/130 b/tests/qemu-iotests/130 index e7e43de6d6..2c4b94da1b 100755 --- a/tests/qemu-iotests/130 +++ b/tests/qemu-iotests/130 @@ -45,6 +45,8 @@ _supported_fmt qcow2 _supported_proto generic _unsupported_proto vxhs _supported_os Linux +# We are going to use lazy-refcounts +_unsupported_imgopts 'compat=3D0.10' =20 qemu_comm_method=3D"monitor" =20 diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137 index eb91e517d7..5a01250005 100755 --- a/tests/qemu-iotests/137 +++ b/tests/qemu-iotests/137 @@ -41,6 +41,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file _supported_os Linux +# We are going to use lazy-refcounts +_unsupported_imgopts 'compat=3D0.10' =20 =20 _make_test_img 64M diff --git a/tests/qemu-iotests/176 b/tests/qemu-iotests/176 index b8dc17c592..d38b3aeb91 100755 --- a/tests/qemu-iotests/176 +++ b/tests/qemu-iotests/176 @@ -48,6 +48,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file _supported_os Linux +# Persistent dirty bitmaps require compat=3D1.1 +_unsupported_imgopts 'compat=3D0.10' =20 function run_qemu() { diff --git a/tests/qemu-iotests/177 b/tests/qemu-iotests/177 index 28990977f1..86cf25f855 100755 --- a/tests/qemu-iotests/177 +++ b/tests/qemu-iotests/177 @@ -39,6 +39,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 =20 _supported_fmt qcow2 _supported_proto file +# This test assumes that discard leaves zero clusters +_unsupported_imgopts 'compat=3D0.10' =20 CLUSTER_SIZE=3D1M size=3D128M @@ -93,15 +95,6 @@ echo "=3D=3D verify image content =3D=3D" =20 function verify_io() { - if ($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | - grep "compat: 0.10" > /dev/null); then - # For v2 images, discarded clusters are read from the backing file - discarded=3D11 - else - # Discarded clusters are zeroed for v3 or later - discarded=3D0 - fi - echo read -P 22 0 1000 echo read -P 33 1000 128k echo read -P 22 132072 7871512 @@ -109,7 +102,7 @@ function verify_io() echo read -P 22 10096640 23457792 echo read -P 0 32M 32M echo read -P 22 64M 13M - echo read -P $discarded 77M 29M + echo read -P 0 77M 29M echo read -P 22 106M 4M echo read -P 11 110M 18M } --=20 2.13.6 From nobody Sun May 5 17:24:21 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 151140327948597.13746289056769; Wed, 22 Nov 2017 18:14:39 -0800 (PST) Received: from localhost ([::1]:42137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh2E-0000kK-KE for importer@patchew.org; Wed, 22 Nov 2017 21:14:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxW-0005GL-8D for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxV-0001uz-1L for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55694) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxN-0001la-Vd; Wed, 22 Nov 2017 21:09:38 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 368797EA87; Thu, 23 Nov 2017 02:09:37 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACA3F6055F; Thu, 23 Nov 2017 02:09:31 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:25 +0100 Message-Id: <20171123020832.8165-11-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 23 Nov 2017 02:09:37 +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 10/17] iotests: Fix 020 for vmdk 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 , Fam Zheng , John Snow , 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" vmdk cannot work with anything but vmdk backing files, so make the backing file be the same format as the overlay. Reported-by: John Snow Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Reviewed-by: John Snow --- tests/qemu-iotests/020 | 9 ++++++--- tests/qemu-iotests/020.out | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020 index d22ab81414..eac5080f83 100755 --- a/tests/qemu-iotests/020 +++ b/tests/qemu-iotests/020 @@ -111,10 +111,12 @@ echo echo 'Testing failing commit' echo =20 +TEST_IMG=3D"$TEST_IMG.base" _make_test_img 1M + # Create an image with a null backing file to which committing will fail (= with # ENOSPC so we can distinguish the result from some generic EIO which may = be # generated anywhere in the block layer) -_make_test_img -b "json:{'driver': 'raw', +_make_test_img -b "json:{'driver': '$IMGFMT', 'file': { 'driver': 'blkdebug', 'inject-error': [{ @@ -123,14 +125,15 @@ _make_test_img -b "json:{'driver': 'raw', 'once': true }], 'image': { - 'driver': 'null-co' + 'driver': 'file', + 'filename': '$TEST_IMG.base' }}}" =20 # Just write anything so committing will not be a no-op $QEMU_IO -c 'writev 0 64k' "$TEST_IMG" | _filter_qemu_io =20 $QEMU_IMG commit "$TEST_IMG" -_cleanup_test_img +_cleanup =20 # success, all done echo "*** done" diff --git a/tests/qemu-iotests/020.out b/tests/qemu-iotests/020.out index 165b70aa49..4b722b2dd0 100644 --- a/tests/qemu-iotests/020.out +++ b/tests/qemu-iotests/020.out @@ -1078,7 +1078,8 @@ No errors were found on the image. =20 Testing failing commit =20 -Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1073741824 backing_fil= e=3Djson:{'driver': 'raw',, +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=3DIMGFMT size=3D1048576 +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1048576 backing_file= =3Djson:{'driver': 'IMGFMT',, 'file': { 'driver': 'blkdebug',, 'inject-error': [{ @@ -1087,7 +1088,8 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1= 073741824 backing_file=3Djson:{'d 'once': true }],, 'image': { - 'driver': 'null-co' + 'driver': 'file',, + 'filename': 'TEST_DIR/t.IMGFMT.base' }}} wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) --=20 2.13.6 From nobody Sun May 5 17:24:21 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 1511403415309193.27764383181147; Wed, 22 Nov 2017 18:16:55 -0800 (PST) Received: from localhost ([::1]:42156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh4H-0002UL-F6 for importer@patchew.org; Wed, 22 Nov 2017 21:16:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxW-0005GK-8F for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxV-0001vC-6R for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38246) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxQ-0001nM-Ba; Wed, 22 Nov 2017 21:09:40 -0500 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 9CEAB81DE1; Thu, 23 Nov 2017 02:09:39 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 280F760F89; Thu, 23 Nov 2017 02:09:38 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:26 +0100 Message-Id: <20171123020832.8165-12-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@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]); Thu, 23 Nov 2017 02:09:39 +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 11/17] iotests: Fix 051 for compat=0.10 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 , Fam Zheng , John Snow , 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" 051 has both compat=3D1.1 and compat=3D0.10 tests (once it uses lazy_refcounts, once it tests that setting them does not work). For the compat=3D0.10 tests, it already explicitly creates a suitable image. So let's just ignore the user-specified compat level for the lazy_refcounts test and explicitly create a compat=3D1.1 image there, too. Signed-off-by: Max Reitz --- tests/qemu-iotests/051 | 2 ++ tests/qemu-iotests/051.out | 1 + tests/qemu-iotests/051.pc.out | 1 + 3 files changed, 4 insertions(+) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index dba8816c9f..0c3be16489 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -131,6 +131,8 @@ echo echo =3D=3D=3D Enable and disable lazy refcounting on the command line, pl= us some invalid values =3D=3D=3D echo =20 +_make_test_img -o compat=3D1.1 "$size" + run_qemu -drive file=3D"$TEST_IMG",format=3Dqcow2,lazy-refcounts=3Don run_qemu -drive file=3D"$TEST_IMG",format=3Dqcow2,lazy-refcounts=3Doff run_qemu -drive file=3D"$TEST_IMG",format=3Dqcow2,lazy-refcounts=3D diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index e3c6eaba57..dd9846d1ce 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -77,6 +77,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,file.backing.dr= iver=3Dqcow2,file.backing.f =20 =3D=3D=3D Enable and disable lazy refcounting on the command line, plus so= me invalid values =3D=3D=3D =20 +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index f2c5622cee..830c11880a 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -77,6 +77,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,file.backing.dr= iver=3Dqcow2,file.backing.f =20 =3D=3D=3D Enable and disable lazy refcounting on the command line, plus so= me invalid values =3D=3D=3D =20 +Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,lazy-refcounts=3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit --=20 2.13.6 From nobody Sun May 5 17:24:21 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 1511403678792178.121466740983; Wed, 22 Nov 2017 18:21:18 -0800 (PST) Received: from localhost ([::1]:42192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh8f-0006Sl-VW for importer@patchew.org; Wed, 22 Nov 2017 21:21:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxV-0005Fu-R2 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxU-0001uu-Tz for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40122) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxS-0001ph-Nl; Wed, 22 Nov 2017 21:09:42 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07F8D3680C; Thu, 23 Nov 2017 02:09:42 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8FD4A189CD; Thu, 23 Nov 2017 02:09:41 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:27 +0100 Message-Id: <20171123020832.8165-13-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 23 Nov 2017 02:09:42 +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 12/17] iotests: Fix 059's reference 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 , Fam Zheng , John Snow , 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" As of commit 9877860e7bd1e26ee70ab9bb5ebc34c92bf23bf5, vmdk fails differently when opening the sample image. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Reviewed-by: John Snow --- tests/qemu-iotests/059.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out index f6dce7947c..1ac5d56233 100644 --- a/tests/qemu-iotests/059.out +++ b/tests/qemu-iotests/059.out @@ -2358,5 +2358,5 @@ Offset Length Mapped to File 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 +qemu-img: Could not open 'TEST_DIR/afl9.IMGFMT': Could not open 'TEST_DIR/= afl9.IMGFMT': Invalid argument *** done --=20 2.13.6 From nobody Sun May 5 17:24:21 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 1511403578545916.940842454618; Wed, 22 Nov 2017 18:19:38 -0800 (PST) Received: from localhost ([::1]:42172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh73-0005Cw-Ps for importer@patchew.org; Wed, 22 Nov 2017 21:19:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxh-0005PM-N1 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:10:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxg-0002CT-Dr for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37742) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxZ-000202-FA; Wed, 22 Nov 2017 21:09:49 -0500 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 AD6A583F44; Thu, 23 Nov 2017 02:09:48 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0290861982; Thu, 23 Nov 2017 02:09:43 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:28 +0100 Message-Id: <20171123020832.8165-14-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@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.27]); Thu, 23 Nov 2017 02:09:48 +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 13/17] iotests: Fix 067 for compat=0.10 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 , Fam Zheng , John Snow , 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" 067 works very well with compat=3D0.10 once you remove format-specific information from the QMP output. Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/067 | 3 +- tests/qemu-iotests/067.out | 97 +++++++++++++-----------------------------= ---- 2 files changed, 28 insertions(+), 72 deletions(-) diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067 index 9d561ef786..fe259f6165 100755 --- a/tests/qemu-iotests/067 +++ b/tests/qemu-iotests/067 @@ -57,7 +57,8 @@ function run_qemu() { do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp | _filter_qemu \ | _filter_actual_image_size \ - | _filter_generated_node_ids | _filter_qmp_events + | _filter_generated_node_ids | _filter_qmp_event= s \ + | _filter_img_info } =20 size=3D128M diff --git a/tests/qemu-iotests/067.out b/tests/qemu-iotests/067.out index 58e83c4505..2e71cff3ce 100644 --- a/tests/qemu-iotests/067.out +++ b/tests/qemu-iotests/067.out @@ -3,7 +3,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1342177= 28 =20 =3D=3D=3D -drive/-device and device_del =3D=3D=3D =20 -Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,if=3Dnone,id=3Ddisk= -device virtio-blk,drive=3Ddisk,id=3Dvirtio0 +Testing: -drive file=3DTEST_DIR/t.IMGFMT,format=3DIMGFMT,if=3Dnone,id=3Ddi= sk -device virtio-blk,drive=3Ddisk,id=3Dvirtio0 { QMP_VERSION } @@ -23,26 +23,17 @@ Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,= if=3Dnone,id=3Ddisk -device virti "detect_zeroes": "off", "image": { "virtual-size": 134217728, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "NODE_NAME", "backing_file_depth": 0, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, @@ -54,7 +45,7 @@ Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,if= =3Dnone,id=3Ddisk -device virti "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false }, "qdev": "/machine/peripheral/virtio0/virtio-backend", @@ -81,7 +72,7 @@ Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,if= =3Dnone,id=3Ddisk -device virti =20 =3D=3D=3D -drive/device_add and device_del =3D=3D=3D =20 -Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,if=3Dnone,id=3Ddisk +Testing: -drive file=3DTEST_DIR/t.IMGFMT,format=3DIMGFMT,if=3Dnone,id=3Ddi= sk { QMP_VERSION } @@ -100,26 +91,17 @@ Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2= ,if=3Dnone,id=3Ddisk "detect_zeroes": "off", "image": { "virtual-size": 134217728, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "NODE_NAME", "backing_file_depth": 0, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, @@ -131,7 +113,7 @@ Testing: -drive file=3DTEST_DIR/t.qcow2,format=3Dqcow2,= if=3Dnone,id=3Ddisk "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false }, "type": "unknown" @@ -183,26 +165,17 @@ Testing: "detect_zeroes": "off", "image": { "virtual-size": 134217728, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "NODE_NAME", "backing_file_depth": 0, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, @@ -214,7 +187,7 @@ Testing: "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false }, "type": "unknown" @@ -263,26 +236,17 @@ Testing: "detect_zeroes": "off", "image": { "virtual-size": 134217728, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "disk", "backing_file_depth": 0, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, @@ -294,7 +258,7 @@ Testing: "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false }, { @@ -302,7 +266,7 @@ Testing: "detect_zeroes": "off", "image": { "virtual-size": 197120, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -323,7 +287,7 @@ Testing: "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false } ] @@ -347,26 +311,17 @@ Testing: "detect_zeroes": "off", "image": { "virtual-size": 134217728, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "disk", "backing_file_depth": 0, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, @@ -378,7 +333,7 @@ Testing: "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false }, { @@ -386,7 +341,7 @@ Testing: "detect_zeroes": "off", "image": { "virtual-size": 197120, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -407,7 +362,7 @@ Testing: "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false } ] --=20 2.13.6 From nobody Sun May 5 17:24:21 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 1511403683852592.1846903740005; Wed, 22 Nov 2017 18:21:23 -0800 (PST) Received: from localhost ([::1]:42194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh8l-0006Xd-5q for importer@patchew.org; Wed, 22 Nov 2017 21:21:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxi-0005Q1-B0 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:10:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxh-0002Dx-D8 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:09:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52538) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxf-00029W-B2; Wed, 22 Nov 2017 21:09:55 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F0014ACBB; Thu, 23 Nov 2017 02:09:54 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4E105D6A5; Thu, 23 Nov 2017 02:09:50 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:29 +0100 Message-Id: <20171123020832.8165-15-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 23 Nov 2017 02:09:54 +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 14/17] iotests: Make 089 compatible with compat=0.10 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 , Fam Zheng , John Snow , 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" The only thing that is missing is a _filter_img_info after the "$QEMU_IO -c info" invocations. Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/089 | 4 ++-- tests/qemu-iotests/089.out | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/tests/qemu-iotests/089 b/tests/qemu-iotests/089 index 9bfe2307b3..0b059aba90 100755 --- a/tests/qemu-iotests/089 +++ b/tests/qemu-iotests/089 @@ -119,11 +119,11 @@ echo =20 # Both options given directly and those given in the filename should be us= ed $QEMU_IO -c "open -o driver=3Dqcow2 json:{\"file.filename\":\"$TEST_IMG\"}= " \ - -c "info" 2>&1 | _filter_testdir | _filter_imgfmt + -c "info" 2>&1 | _filter_img_info =20 # Options given directly should be prioritized over those given in the fil= ename $QEMU_IO -c "open -o driver=3Dqcow2 json:{\"driver\":\"raw\",\"file.filena= me\":\"$TEST_IMG\"}" \ - -c "info" 2>&1 | _filter_testdir | _filter_imgfmt + -c "info" 2>&1 | _filter_img_info =20 =20 # success, all done diff --git a/tests/qemu-iotests/089.out b/tests/qemu-iotests/089.out index 18f5fdda7a..0bf5a13ec1 100644 --- a/tests/qemu-iotests/089.out +++ b/tests/qemu-iotests/089.out @@ -38,17 +38,7 @@ cluster_size: 65536 format name: IMGFMT cluster size: 64 KiB vm state offset: 512 MiB -Format specific information: - compat: 1.1 - lazy refcounts: false - refcount bits: 16 - corrupt: false format name: IMGFMT cluster size: 64 KiB vm state offset: 512 MiB -Format specific information: - compat: 1.1 - lazy refcounts: false - refcount bits: 16 - corrupt: false *** done --=20 2.13.6 From nobody Sun May 5 17:24:21 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511403841588853.0163207748152; Wed, 22 Nov 2017 18:24:01 -0800 (PST) Received: from localhost ([::1]:42208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHhB8-00007H-RX for importer@patchew.org; Wed, 22 Nov 2017 21:23:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxu-0005ZN-JQ for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:10:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxt-0002Nk-C4 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:10:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52558) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxm-0002JO-MS; Wed, 22 Nov 2017 21:10:02 -0500 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 E52204900B; Thu, 23 Nov 2017 02:10:01 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93C3A1F8; Thu, 23 Nov 2017 02:09:56 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:30 +0100 Message-Id: <20171123020832.8165-16-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@redhat.com> 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.38]); Thu, 23 Nov 2017 02:10:01 +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 15/17] iotests: Make 184 image-less 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 , Fam Zheng , John Snow , 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" 184 does not need an image, so don't use one. Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/184 | 25 ++++-------------- tests/qemu-iotests/184.out | 63 +++++++-----------------------------------= ---- 2 files changed, 14 insertions(+), 74 deletions(-) diff --git a/tests/qemu-iotests/184 b/tests/qemu-iotests/184 index ee96c99af3..2b68284d58 100755 --- a/tests/qemu-iotests/184 +++ b/tests/qemu-iotests/184 @@ -27,18 +27,12 @@ echo "QA output created by $seq" here=3D`pwd` status=3D1 # failure is the default! =20 -_cleanup() -{ - _cleanup_test_img -} -trap "_cleanup; exit \$status" 0 1 2 3 15 +trap "exit \$status" 0 1 2 3 15 =20 # get standard environment, filters and checks . ./common.rc . ./common.filter =20 -_supported_fmt qcow2 -_supported_proto file _supported_os Linux =20 function do_run_qemu() @@ -55,7 +49,6 @@ function run_qemu() | _filter_actual_image_size } =20 -_make_test_img 64M test_throttle=3D$($QEMU_IMG --help|grep throttle) [ "$test_throttle" =3D "" ] && _supported_fmt throttle =20 @@ -66,12 +59,8 @@ run_qemu < Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511403935684432.1383514805576; Wed, 22 Nov 2017 18:25:35 -0800 (PST) Received: from localhost ([::1]:42223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHhCm-0001Tr-Ty for importer@patchew.org; Wed, 22 Nov 2017 21:25:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgy2-0005ja-IK for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:10:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgxz-0002RU-BH for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:10:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52584) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxt-0002Ng-PG; Wed, 22 Nov 2017 21:10:10 -0500 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 0E7874900B; Thu, 23 Nov 2017 02:10:09 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04CBB60F89; Thu, 23 Nov 2017 02:10:03 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:31 +0100 Message-Id: <20171123020832.8165-17-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@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.38]); Thu, 23 Nov 2017 02:10:09 +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 16/17] iotests: Make 191 work with qcow2 options 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 , Fam Zheng , John Snow , 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" In order for 191 to work with an explicit refcount_bits or compat=3D0.10, we should strip format-specific information from the output--and we can do so by using _filter_img_info. Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/191 | 5 +- tests/qemu-iotests/191.out | 313 +++++++++++++----------------------------= ---- 2 files changed, 91 insertions(+), 227 deletions(-) diff --git a/tests/qemu-iotests/191 b/tests/qemu-iotests/191 index ad785e10b1..dfad6555e4 100755 --- a/tests/qemu-iotests/191 +++ b/tests/qemu-iotests/191 @@ -45,7 +45,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.qemu =20 _supported_fmt qcow2 -_unsupported_imgopts compat=3D0.10 _supported_proto file _supported_os Linux =20 @@ -92,7 +91,7 @@ echo =3D=3D=3D Check that both top and top2 point to base= now =3D=3D=3D echo =20 _send_qemu_cmd $h "{ 'execute': 'query-named-block-nodes' }" "^}" | - _filter_generated_node_ids | _filter_actual_image_size + _filter_generated_node_ids | _filter_actual_image_size | _filter_img_i= nfo =20 _send_qemu_cmd $h "{ 'execute': 'quit' }" "^}" wait=3D1 _cleanup_qemu @@ -140,7 +139,7 @@ echo =3D=3D=3D Check that both top and top2 point to ba= se now =3D=3D=3D echo =20 _send_qemu_cmd $h "{ 'execute': 'query-named-block-nodes' }" "^}" | - _filter_generated_node_ids | _filter_actual_image_size + _filter_generated_node_ids | _filter_actual_image_size | _filter_img_i= nfo =20 _send_qemu_cmd $h "{ 'execute': 'quit' }" "^}" wait=3D1 _cleanup_qemu diff --git a/tests/qemu-iotests/191.out b/tests/qemu-iotests/191.out index 73c0ed454c..190c5f049a 100644 --- a/tests/qemu-iotests/191.out +++ b/tests/qemu-iotests/191.out @@ -44,49 +44,31 @@ wrote 65536/65536 bytes at offset 1048576 "image": { "backing-image": { "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, - "backing-filename-format": "qcow2", + "backing-filename-format": "IMGFMT", "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.ovl2", + "filename": "TEST_DIR/t.IMGFMT.ovl2", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, - "full-backing-filename": "TEST_DIR/t.qcow2.base", - "backing-filename": "TEST_DIR/t.qcow2.base", + "full-backing-filename": "TEST_DIR/t.IMGFMT.base", + "backing-filename": "TEST_DIR/t.IMGFMT.base", "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "top2", "backing_file_depth": 1, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, - "backing_file": "TEST_DIR/t.qcow2.base", + "backing_file": "TEST_DIR/t.IMGFMT.base", "encrypted": false, "bps": 0, "bps_rd": 0, @@ -95,7 +77,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.ovl2", + "file": "TEST_DIR/t.IMGFMT.ovl2", "encryption_key_missing": false }, { @@ -103,7 +85,7 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 197120, - "filename": "TEST_DIR/t.qcow2.ovl2", + "filename": "TEST_DIR/t.IMGFMT.ovl2", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -124,7 +106,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.ovl2", + "file": "TEST_DIR/t.IMGFMT.ovl2", "encryption_key_missing": false }, { @@ -133,49 +115,31 @@ wrote 65536/65536 bytes at offset 1048576 "image": { "backing-image": { "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, - "backing-filename-format": "qcow2", + "backing-filename-format": "IMGFMT", "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, - "full-backing-filename": "TEST_DIR/t.qcow2.base", - "backing-filename": "TEST_DIR/t.qcow2.base", + "full-backing-filename": "TEST_DIR/t.IMGFMT.base", + "backing-filename": "TEST_DIR/t.IMGFMT.base", "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "top", "backing_file_depth": 1, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, - "backing_file": "TEST_DIR/t.qcow2.base", + "backing_file": "TEST_DIR/t.IMGFMT.base", "encrypted": false, "bps": 0, "bps_rd": 0, @@ -184,7 +148,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false }, { @@ -192,7 +156,7 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 197120, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -213,7 +177,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false }, { @@ -222,49 +186,31 @@ wrote 65536/65536 bytes at offset 1048576 "image": { "backing-image": { "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, - "backing-filename-format": "qcow2", + "backing-filename-format": "IMGFMT", "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.mid", + "filename": "TEST_DIR/t.IMGFMT.mid", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, - "full-backing-filename": "TEST_DIR/t.qcow2.base", - "backing-filename": "TEST_DIR/t.qcow2.base", + "full-backing-filename": "TEST_DIR/t.IMGFMT.base", + "backing-filename": "TEST_DIR/t.IMGFMT.base", "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "mid", "backing_file_depth": 1, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, - "backing_file": "TEST_DIR/t.qcow2.base", + "backing_file": "TEST_DIR/t.IMGFMT.base", "encrypted": false, "bps": 0, "bps_rd": 0, @@ -273,7 +219,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.mid", + "file": "TEST_DIR/t.IMGFMT.mid", "encryption_key_missing": false }, { @@ -281,7 +227,7 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 393216, - "filename": "TEST_DIR/t.qcow2.mid", + "filename": "TEST_DIR/t.IMGFMT.mid", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -302,7 +248,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.mid", + "file": "TEST_DIR/t.IMGFMT.mid", "encryption_key_missing": false }, { @@ -310,26 +256,17 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "base", "backing_file_depth": 0, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, @@ -341,7 +278,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.base", + "file": "TEST_DIR/t.IMGFMT.base", "encryption_key_missing": false }, { @@ -349,7 +286,7 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 393216, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -370,7 +307,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.base", + "file": "TEST_DIR/t.IMGFMT.base", "encryption_key_missing": false } ] @@ -447,49 +384,31 @@ wrote 65536/65536 bytes at offset 1048576 "image": { "backing-image": { "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, - "backing-filename-format": "qcow2", + "backing-filename-format": "IMGFMT", "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.ovl2", + "filename": "TEST_DIR/t.IMGFMT.ovl2", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, - "full-backing-filename": "TEST_DIR/t.qcow2.base", - "backing-filename": "TEST_DIR/t.qcow2.base", + "full-backing-filename": "TEST_DIR/t.IMGFMT.base", + "backing-filename": "TEST_DIR/t.IMGFMT.base", "dirty-flag": false }, "iops_wr": 0, "ro": true, "node-name": "NODE_NAME", "backing_file_depth": 1, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, - "backing_file": "TEST_DIR/t.qcow2.base", + "backing_file": "TEST_DIR/t.IMGFMT.base", "encrypted": false, "bps": 0, "bps_rd": 0, @@ -498,7 +417,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.ovl2", + "file": "TEST_DIR/t.IMGFMT.ovl2", "encryption_key_missing": false }, { @@ -506,7 +425,7 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 197120, - "filename": "TEST_DIR/t.qcow2.ovl2", + "filename": "TEST_DIR/t.IMGFMT.ovl2", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -527,7 +446,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.ovl2", + "file": "TEST_DIR/t.IMGFMT.ovl2", "encryption_key_missing": false }, { @@ -537,68 +456,41 @@ wrote 65536/65536 bytes at offset 1048576 "backing-image": { "backing-image": { "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, - "backing-filename-format": "qcow2", + "backing-filename-format": "IMGFMT", "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.ovl2", + "filename": "TEST_DIR/t.IMGFMT.ovl2", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, - "full-backing-filename": "TEST_DIR/t.qcow2.base", - "backing-filename": "TEST_DIR/t.qcow2.base", + "full-backing-filename": "TEST_DIR/t.IMGFMT.base", + "backing-filename": "TEST_DIR/t.IMGFMT.base", "dirty-flag": false }, - "backing-filename-format": "qcow2", + "backing-filename-format": "IMGFMT", "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.ovl3", + "filename": "TEST_DIR/t.IMGFMT.ovl3", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, - "full-backing-filename": "TEST_DIR/t.qcow2.ovl2", - "backing-filename": "TEST_DIR/t.qcow2.ovl2", + "full-backing-filename": "TEST_DIR/t.IMGFMT.ovl2", + "backing-filename": "TEST_DIR/t.IMGFMT.ovl2", "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "top2", "backing_file_depth": 2, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, - "backing_file": "TEST_DIR/t.qcow2.ovl2", + "backing_file": "TEST_DIR/t.IMGFMT.ovl2", "encrypted": false, "bps": 0, "bps_rd": 0, @@ -607,7 +499,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.ovl3", + "file": "TEST_DIR/t.IMGFMT.ovl3", "encryption_key_missing": false }, { @@ -615,7 +507,7 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 197120, - "filename": "TEST_DIR/t.qcow2.ovl3", + "filename": "TEST_DIR/t.IMGFMT.ovl3", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -636,7 +528,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.ovl3", + "file": "TEST_DIR/t.IMGFMT.ovl3", "encryption_key_missing": false }, { @@ -644,26 +536,17 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, "iops_wr": 0, "ro": true, "node-name": "NODE_NAME", "backing_file_depth": 0, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, @@ -675,7 +558,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.base", + "file": "TEST_DIR/t.IMGFMT.base", "encryption_key_missing": false }, { @@ -683,7 +566,7 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 393216, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -704,7 +587,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2.base", + "file": "TEST_DIR/t.IMGFMT.base", "encryption_key_missing": false }, { @@ -713,49 +596,31 @@ wrote 65536/65536 bytes at offset 1048576 "image": { "backing-image": { "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2.base", + "filename": "TEST_DIR/t.IMGFMT.base", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, "dirty-flag": false }, - "backing-filename-format": "qcow2", + "backing-filename-format": "IMGFMT", "virtual-size": 67108864, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "cluster-size": 65536, - "format": "qcow2", + "format": "IMGFMT", "actual-size": SIZE, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, - "full-backing-filename": "TEST_DIR/t.qcow2.base", - "backing-filename": "TEST_DIR/t.qcow2.base", + "full-backing-filename": "TEST_DIR/t.IMGFMT.base", + "backing-filename": "TEST_DIR/t.IMGFMT.base", "dirty-flag": false }, "iops_wr": 0, "ro": false, "node-name": "top", "backing_file_depth": 1, - "drv": "qcow2", + "drv": "IMGFMT", "iops": 0, "bps_wr": 0, "write_threshold": 0, - "backing_file": "TEST_DIR/t.qcow2.base", + "backing_file": "TEST_DIR/t.IMGFMT.base", "encrypted": false, "bps": 0, "bps_rd": 0, @@ -764,7 +629,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false }, { @@ -772,7 +637,7 @@ wrote 65536/65536 bytes at offset 1048576 "detect_zeroes": "off", "image": { "virtual-size": 197120, - "filename": "TEST_DIR/t.qcow2", + "filename": "TEST_DIR/t.IMGFMT", "format": "file", "actual-size": SIZE, "dirty-flag": false @@ -793,7 +658,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.qcow2", + "file": "TEST_DIR/t.IMGFMT", "encryption_key_missing": false } ] --=20 2.13.6 From nobody Sun May 5 17:24:21 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 1511403465867822.7311713735872; Wed, 22 Nov 2017 18:17:45 -0800 (PST) Received: from localhost ([::1]:42158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh53-0003WV-1b for importer@patchew.org; Wed, 22 Nov 2017 21:17:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgy3-0005lX-DH for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:10:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHgy2-0002Wy-I3 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 21:10:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52594) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHgxw-0002PW-8E; Wed, 22 Nov 2017 21:10:12 -0500 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 7ED4A4A700; Thu, 23 Nov 2017 02:10:11 +0000 (UTC) Received: from localhost (ovpn-204-18.brq.redhat.com [10.40.204.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1186161982; Thu, 23 Nov 2017 02:10:10 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 23 Nov 2017 03:08:32 +0100 Message-Id: <20171123020832.8165-18-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@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.38]); Thu, 23 Nov 2017 02:10:11 +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 17/17] iotests: Filter compat-dependent info in 198 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 , Fam Zheng , John Snow , 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" There is a bit of image-specific information which depends on the qcow2 compat level. Filter it so that 198 works with compat=3D0.10 (and any refcount_bits value). Note that we cannot simply drop the --format-specific switch because we do need the "encrypt" information. Signed-off-by: Max Reitz --- tests/qemu-iotests/198 | 6 ++++-- tests/qemu-iotests/198.out | 8 -------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/qemu-iotests/198 b/tests/qemu-iotests/198 index a84a058396..54eaaf5153 100755 --- a/tests/qemu-iotests/198 +++ b/tests/qemu-iotests/198 @@ -92,12 +92,14 @@ $QEMU_IO --object $SECRET0 --object $SECRET1 -c "read -= P 0x9 0 $size" --image-op echo echo "=3D=3D checking image base =3D=3D" $QEMU_IMG info --image-opts $IMGSPECBASE | _filter_img_info --format-speci= fic \ - | sed -e "/^disk size:/ D" + | sed -e "/^disk size:/ D" -e '/refcount bits:/ D' -e '/compat:/ D' \ + -e '/lazy refcounts:/ D' -e '/corrupt:/ D' =20 echo echo "=3D=3D checking image layer =3D=3D" $QEMU_IMG info --image-opts $IMGSPECLAYER | _filter_img_info --format-spec= ific \ - | sed -e "/^disk size:/ D" + | sed -e "/^disk size:/ D" -e '/refcount bits:/ D' -e '/compat:/ D' \ + -e '/lazy refcounts:/ D' -e '/corrupt:/ D' =20 =20 # success, all done diff --git a/tests/qemu-iotests/198.out b/tests/qemu-iotests/198.out index 2db565e16b..adb805cce9 100644 --- a/tests/qemu-iotests/198.out +++ b/tests/qemu-iotests/198.out @@ -36,9 +36,6 @@ image: json:{"encrypt.key-secret": "sec0", "driver": "IMG= FMT", "file": {"driver" file format: IMGFMT virtual size: 16M (16777216 bytes) Format specific information: - compat: 1.1 - lazy refcounts: false - refcount bits: 16 encrypt: ivgen alg: plain64 hash alg: sha256 @@ -75,7 +72,6 @@ Format specific information: key offset: 1810432 payload offset: 2068480 master key iters: 1024 - corrupt: false =20 =3D=3D checking image layer =3D=3D image: json:{"encrypt.key-secret": "sec1", "driver": "IMGFMT", "file": {"d= river": "file", "filename": "TEST_DIR/t.IMGFMT"}} @@ -83,9 +79,6 @@ file format: IMGFMT virtual size: 16M (16777216 bytes) backing file: TEST_DIR/t.IMGFMT.base Format specific information: - compat: 1.1 - lazy refcounts: false - refcount bits: 16 encrypt: ivgen alg: plain64 hash alg: sha256 @@ -122,5 +115,4 @@ Format specific information: key offset: 1810432 payload offset: 2068480 master key iters: 1024 - corrupt: false *** done --=20 2.13.6 From nobody Sun May 5 17:24:21 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511983539265940.909759400008; Wed, 29 Nov 2017 11:25:39 -0800 (PST) Received: from localhost ([::1]:44851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK7yv-0002Rc-Tm for importer@patchew.org; Wed, 29 Nov 2017 14:25:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK7y5-00026v-Uh for qemu-devel@nongnu.org; Wed, 29 Nov 2017 14:24:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eK7y5-0001fc-3v for qemu-devel@nongnu.org; Wed, 29 Nov 2017 14:24:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53738) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eK7y0-0001ds-0v; Wed, 29 Nov 2017 14:24:20 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1CB80883B1; Wed, 29 Nov 2017 19:24:19 +0000 (UTC) Received: from localhost (ovpn-204-230.brq.redhat.com [10.40.204.230]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6A6005D6A8; Wed, 29 Nov 2017 19:24:13 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Wed, 29 Nov 2017 20:24:11 +0100 Message-Id: <20171129192411.6637-1-mreitz@redhat.com> In-Reply-To: <20171123020832.8165-1-mreitz@redhat.com> References: <20171123020832.8165-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 29 Nov 2017 19:24:19 +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 18/17] iotests: Make 059 pass on machines with little RAM 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 , Fam Zheng , John Snow , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Max Reitz Reviewed-by: Fam Zheng --- Based-on: <20171123020832.8165-1-mreitz@redhat.com> (Depends on patch 12 of this series; I'll merge both if I have to respin.) --- tests/qemu-iotests/059 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 index a1c34eeb7c..40f89eae18 100755 --- a/tests/qemu-iotests/059 +++ b/tests/qemu-iotests/059 @@ -152,7 +152,9 @@ done echo echo "=3D=3D=3D Testing afl image with a very large capacity =3D=3D=3D" _use_sample_img afl9.vmdk.bz2 -_img_info +# The sed makes this test pass on machines with little RAM +# (and also with 32 bit builds) +_img_info | sed -e 's/Cannot allocate memory/Invalid argument/' _cleanup_test_img =20 # success, all done --=20 2.13.6