From patchwork Thu Nov 23 02:08:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840637 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2nt3SW1z9sNd for ; Thu, 23 Nov 2017 13:09:38 +1100 (AEDT) Received: from localhost ([::1]:42106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxM-0004aH-Ek for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:09:36 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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, int64_t cluster_offset, qemu_iovec_concat(&local_qiov, qiov, qiov_offset, n_bytes); } - write_offset = cluster_offset + offset_in_cluster, + write_offset = cluster_offset + offset_in_cluster; ret = bdrv_co_pwritev(extent->file, write_offset, n_bytes, &local_qiov, 0); From patchwork Thu Nov 23 02:08:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2pM4Mscz9t16 for ; Thu, 23 Nov 2017 13:10:03 +1100 (AEDT) Received: from localhost ([::1]:42108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgxl-0004os-Jb for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:10:01 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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=0.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(BlockDriverState *bs, bool found; Qcow2BitmapList *bm_list; + 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) != 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, } 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 now " + "considered inconsistent"); + } error_printf("Some clusters may be leaked, " "run 'qemu-img check -r' on the image " "file to fix."); From patchwork Thu Nov 23 02:08:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840640 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2sB6mNVz9t1t for ; Thu, 23 Nov 2017 13:12:30 +1100 (AEDT) Received: from localhost ([::1]:42121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh09-0006nd-1V for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:12:29 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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] = l2_offset; tmp = cpu_to_be64(l2_offset); + BLKDBG_EVENT(bs->file, BLKDBG_L1_UPDATE); ret = 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 = 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 = 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 == 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 = QEMU_ALIGN_UP(cluster_offset, s->cluster_size); /* write the cluster content */ + BLKDBG_EVENT(bs->file, BLKDBG_WRITE_AIO); ret = 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 = 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 = cpu_to_be64(cluster_offset); l2_table[l2_index] = tmp; + if (allocate == 2) { + BLKDBG_EVENT(bs->file, BLKDBG_L2_UPDATE_COMPRESSED); + } else { + BLKDBG_EVENT(bs->file, BLKDBG_L2_UPDATE); + } ret = bdrv_pwrite_sync(bs->file, l2_offset + l2_index * sizeof(tmp), &tmp, sizeof(tmp)); if (ret < 0) { @@ -579,6 +589,7 @@ static int decompress_cluster(BlockDriverState *bs, uint64_t cluster_offset) if (s->cluster_cache_offset != coffset) { csize = cluster_offset >> (63 - s->cluster_bits); csize &= (s->cluster_size - 1); + BLKDBG_EVENT(bs->file, BLKDBG_READ_COMPRESSED); ret = bdrv_pread(bs->file, coffset, s->cluster_data, csize); if (ret != csize) return -1; @@ -635,6 +646,8 @@ static coroutine_fn int qcow_co_readv(BlockDriverState *bs, int64_t sector_num, hd_iov.iov_len = 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 = 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 = 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 = 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 = 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 = bdrv_co_writev(bs->file, (cluster_offset >> 9) + index_in_cluster, n, &hd_qiov); @@ -1048,6 +1063,7 @@ qcow_co_pwritev_compressed(BlockDriverState *bs, uint64_t offset, .iov_len = out_len, }; qemu_iovec_init_external(&hd_qiov, &iov, 1); + BLKDBG_EVENT(bs->file, BLKDBG_WRITE_COMPRESSED); ret = bdrv_co_pwritev(bs->file, cluster_offset, out_len, &hd_qiov, 0); if (ret < 0) { goto fail; From patchwork Thu Nov 23 02:08:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840642 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2t85BMGz9sRW for ; Thu, 23 Nov 2017 13:13:20 +1100 (AEDT) Received: from localhost ([::1]:42130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh0w-0007uc-OQ for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:13:18 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 = 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 = 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 = 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 = 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, VmdkMetaData *m_data, { offset = 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 = 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, int64_t cluster_offset, .iov_len = 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); } write_offset = cluster_offset + offset_in_cluster; @@ -1437,6 +1449,7 @@ static int vmdk_read_extent(VmdkExtent *extent, int64_t cluster_offset, if (!extent->compressed) { + BLKDBG_EVENT(extent->file, BLKDBG_READ_AIO); ret = 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 = cluster_bytes * 2; cluster_buf = g_malloc(buf_bytes); uncomp_buf = g_malloc(cluster_bytes); + BLKDBG_EVENT(extent->file, BLKDBG_READ_COMPRESSED); ret = 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); + /* qcow2 emits this on bs->file instead of bs->backing */ + BLKDBG_EVENT(bs->file, BLKDBG_READ_BACKING_AIO); ret = bdrv_co_preadv(bs->backing, offset, n_bytes, &local_qiov, 0); if (ret < 0) { From patchwork Thu Nov 23 02:08:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2wS3S8dz9t0F for ; Thu, 23 Nov 2017 13:15:19 +1100 (AEDT) Received: from localhost ([::1]:42140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh2q-00013p-Jh for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:15:16 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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='' read line; do + while IFS='' read -r line; do if [[ $format_specific == 1 ]]; then discard=0 elif [[ $line == "Format specific information:" ]]; then From patchwork Thu Nov 23 02:08:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840646 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2xX2jhJz9t16 for ; Thu, 23 Nov 2017 13:16:16 +1100 (AEDT) Received: from localhost ([::1]:42152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh3m-0001vK-CQ for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:16:14 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" _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 echo echo "== checking image base ==" -$QEMU_IMG info --image-opts $IMGSPECBASE | _filter_img_info | _filter_testdir | sed -e "/^disk size:/ D" +$QEMU_IMG info --image-opts $IMGSPECBASE | _filter_img_info --format-specific \ + | sed -e "/^disk size:/ D" echo echo "== checking image layer ==" -$QEMU_IMG info --image-opts $IMGSPECLAYER | _filter_img_info | _filter_testdir | sed -e "/^disk size:/ D" +$QEMU_IMG info --image-opts $IMGSPECLAYER | _filter_img_info --format-specific \ + | sed -e "/^disk size:/ D" # success, all done diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index d9237799e9..0c0e53fae7 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -139,6 +139,15 @@ _filter_img_create() _filter_img_info() { + if [[ "$1" == "--format-specific" ]]; then + local format_specific=1 + shift + else + local format_specific=0 + fi + + discard=0 + regex_json_spec_start='^ *"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-000000000000/" + -e "s/uuid: [-a-f0-9]\\+/uuid: 00000000-0000-0000-0000-000000000000/" | \ + while IFS='' read -r line; do + if [[ $format_specific == 1 ]]; then + discard=0 + elif [[ $line == "Format specific information:" ]]; then + discard=1 + elif [[ $line =~ $regex_json_spec_start ]]; then + discard=2 + regex_json_spec_end="^${line%%[^ ]*}\\},? *$" + fi + if [[ $discard == 0 ]]; then + echo "$line" + elif [[ $discard == 1 && ! $line ]]; then + echo + discard=0 + elif [[ $discard == 2 && $line =~ $regex_json_spec_end ]]; then + discard=0 + fi + done } # filter out offsets and file names from qemu-img map; good for both From patchwork Thu Nov 23 02:08:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840639 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2pq07flz9t16 for ; Thu, 23 Nov 2017 13:10:27 +1100 (AEDT) Received: from localhost ([::1]:42110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHgy8-00057Q-WC for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:10:25 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This test does funny things like TEST_IMG="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 # 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=monolithicFlat" \ "subformat=twoGbMaxExtentFlat" \ "subformat=twoGbMaxExtentSparse" -# NFS does not support bdrv_reopen_prepare thus qemu-img commit fails. -if [ "$IMGPROTO" = "nfs" ]; then - _notrun "image protocol $IMGPROTO does not support bdrv_commit" -fi - TEST_OFFSETS="0 4294967296" TEST_IMG_SAVE="$TEST_IMG" From patchwork Thu Nov 23 02:08:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2zl5VLbz9t0F for ; Thu, 23 Nov 2017 13:18:11 +1100 (AEDT) Received: from localhost ([::1]:42160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh5d-0003pk-RB for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:18:09 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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=1 +_unsupported_imgopts 'refcount_bits=1[^0-9]' IMG_SIZE=64K From patchwork Thu Nov 23 02:08:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840641 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2sX5PSxz9t0F for ; Thu, 23 Nov 2017 13:12:48 +1100 (AEDT) Received: from localhost ([::1]:42125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh0Q-0007B6-MK for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:12:46 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Tests 080, 130, 137, and 176 simply do not work with compat=0.10 for the reasons stated there. 177 is a bit more interesting: Originally, it was actually very much intended to work with compat=0.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=0.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=1 -_unsupported_imgopts 'refcount_bits=1[^0-9]' +# - Internal snapshots are (currently) impossible with refcount_bits=1 +# - This is generally a test for compat=1.1 images +_unsupported_imgopts 'refcount_bits=1[^0-9]' 'compat=0.10' header_size=104 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=0.10' qemu_comm_method="monitor" 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=0.10' _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=1.1 +_unsupported_imgopts 'compat=0.10' 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 _supported_fmt qcow2 _supported_proto file +# This test assumes that discard leaves zero clusters +_unsupported_imgopts 'compat=0.10' CLUSTER_SIZE=1M size=128M @@ -93,15 +95,6 @@ echo "== verify image content ==" 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=11 - else - # Discarded clusters are zeroed for v3 or later - discarded=0 - 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 } From patchwork Thu Nov 23 02:08:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840643 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2tN0xWDz9sRW for ; Thu, 23 Nov 2017 13:13:32 +1100 (AEDT) Received: from localhost ([::1]:42133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh18-00083l-4g for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:13:30 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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: John Snow Reviewed-by: Fam Zheng --- 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 +TEST_IMG="$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' }}}" # Just write anything so committing will not be a no-op $QEMU_IO -c 'writev 0 64k' "$TEST_IMG" | _filter_qemu_io $QEMU_IMG commit "$TEST_IMG" -_cleanup_test_img +_cleanup # 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. Testing failing commit -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 backing_file=json:{'driver': 'raw',, +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=1048576 +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=json:{'driver': 'IMGFMT',, 'file': { 'driver': 'blkdebug',, 'inject-error': [{ @@ -1087,7 +1088,8 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 backing_file=json:{'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) From patchwork Thu Nov 23 02:08:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840645 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2wl69SGz9t0F for ; Thu, 23 Nov 2017 13:15:35 +1100 (AEDT) Received: from localhost ([::1]:42142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh37-0001HK-TT for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:15:33 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 051 has both compat=1.1 and compat=0.10 tests (once it uses lazy_refcounts, once it tests that setting them does not work). For the compat=0.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=1.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 === Enable and disable lazy refcounting on the command line, plus some invalid values === echo +_make_test_img -o compat=1.1 "$size" + run_qemu -drive file="$TEST_IMG",format=qcow2,lazy-refcounts=on run_qemu -drive file="$TEST_IMG",format=qcow2,lazy-refcounts=off run_qemu -drive file="$TEST_IMG",format=qcow2,lazy-refcounts= 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=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.f === Enable and disable lazy refcounting on the command line, plus some invalid values === +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on 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=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.f === Enable and disable lazy refcounting on the command line, plus some invalid values === +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit From patchwork Thu Nov 23 02:08:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840650 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj32c25PDz9t0F for ; Thu, 23 Nov 2017 13:20:39 +1100 (AEDT) Received: from localhost ([::1]:42182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh7z-0005pQ-NE for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:20:35 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" As of commit 9877860e7bd1e26ee70ab9bb5ebc34c92bf23bf5, vmdk fails differently when opening the sample image. Signed-off-by: Max Reitz Reviewed-by: John Snow Reviewed-by: Fam Zheng --- 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 === Testing afl image with a very large capacity === -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 From patchwork Thu Nov 23 02:08:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840649 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj30M59Nyz9t0F for ; Thu, 23 Nov 2017 13:18:43 +1100 (AEDT) Received: from localhost ([::1]:42164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh69-0004Ch-Mo for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:18:41 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 067 works very well with compat=0.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_events \ + | _filter_img_info } size=128M 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=IMGFMT size=134217728 === -drive/-device and device_del === -Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk -device virtio-blk,drive=disk,id=virtio0 +Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk -device virtio-blk,drive=disk,id=virtio0 { QMP_VERSION } @@ -23,26 +23,17 @@ Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk -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=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk -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=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk -device virti === -drive/device_add and device_del === -Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk +Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk { QMP_VERSION } @@ -100,26 +91,17 @@ Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk "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=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk "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 } ] From patchwork Thu Nov 23 02:08:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840651 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj32d68Bsz9t0F for ; Thu, 23 Nov 2017 13:20:41 +1100 (AEDT) Received: from localhost ([::1]:42189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh83-0005us-SN for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:20:39 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 # Both options given directly and those given in the filename should be used $QEMU_IO -c "open -o driver=qcow2 json:{\"file.filename\":\"$TEST_IMG\"}" \ - -c "info" 2>&1 | _filter_testdir | _filter_imgfmt + -c "info" 2>&1 | _filter_img_info # Options given directly should be prioritized over those given in the filename $QEMU_IO -c "open -o driver=qcow2 json:{\"driver\":\"raw\",\"file.filename\":\"$TEST_IMG\"}" \ - -c "info" 2>&1 | _filter_testdir | _filter_imgfmt + -c "info" 2>&1 | _filter_img_info # 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 From patchwork Thu Nov 23 02:08:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840652 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj35V1Fs1z9t0F for ; Thu, 23 Nov 2017 13:23:10 +1100 (AEDT) Received: from localhost ([::1]:42203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHhAS-0007sw-8n for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:23:08 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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=`pwd` status=1 # failure is the default! -_cleanup() -{ - _cleanup_test_img -} -trap "_cleanup; exit \$status" 0 1 2 3 15 +trap "exit \$status" 0 1 2 3 15 # get standard environment, filters and checks . ./common.rc . ./common.filter -_supported_fmt qcow2 -_supported_proto file _supported_os Linux function do_run_qemu() @@ -55,7 +49,6 @@ function run_qemu() | _filter_actual_image_size } -_make_test_img 64M test_throttle=$($QEMU_IMG --help|grep throttle) [ "$test_throttle" = "" ] && _supported_fmt throttle @@ -66,12 +59,8 @@ run_qemu < X-Patchwork-Id: 840653 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj37b6RKcz9t0F for ; Thu, 23 Nov 2017 13:24:59 +1100 (AEDT) Received: from localhost ([::1]:42213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHhCE-0000ss-07 for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:24:58 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" In order for 191 to work with an explicit refcount_bits or compat=0.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 _supported_fmt qcow2 -_unsupported_imgopts compat=0.10 _supported_proto file _supported_os Linux @@ -92,7 +91,7 @@ echo === Check that both top and top2 point to base now === echo _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_info _send_qemu_cmd $h "{ 'execute': 'quit' }" "^}" wait=1 _cleanup_qemu @@ -140,7 +139,7 @@ echo === Check that both top and top2 point to base now === echo _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_info _send_qemu_cmd $h "{ 'execute': 'quit' }" "^}" wait=1 _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 } ] From patchwork Thu Nov 23 02:08:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 840647 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yj2xc4ndRz9t16 for ; Thu, 23 Nov 2017 13:16:20 +1100 (AEDT) Received: from localhost ([::1]:42154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHh3q-0001xt-Li for incoming@patchwork.ozlabs.org; Wed, 22 Nov 2017 21:16:18 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" There is a bit of image-specific information which depends on the qcow2 compat level. Filter it so that 198 works with compat=0.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 Reviewed-by: John Snow --- 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 "== checking image base ==" $QEMU_IMG info --image-opts $IMGSPECBASE | _filter_img_info --format-specific \ - | sed -e "/^disk size:/ D" + | sed -e "/^disk size:/ D" -e '/refcount bits:/ D' -e '/compat:/ D' \ + -e '/lazy refcounts:/ D' -e '/corrupt:/ D' echo echo "== checking image layer ==" $QEMU_IMG info --image-opts $IMGSPECLAYER | _filter_img_info --format-specific \ - | sed -e "/^disk size:/ D" + | sed -e "/^disk size:/ D" -e '/refcount bits:/ D' -e '/compat:/ D' \ + -e '/lazy refcounts:/ D' -e '/corrupt:/ D' # 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": "IMGFMT", "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 == checking image layer == image: json:{"encrypt.key-secret": "sec1", "driver": "IMGFMT", "file": {"driver": "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 From patchwork Wed Nov 29 19:24:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 842702 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yn9Tg0R1Kz9ryr for ; Thu, 30 Nov 2017 06:24:51 +1100 (AEDT) Received: from localhost ([::1]:44843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK7yS-00029H-J0 for incoming@patchwork.ozlabs.org; Wed, 29 Nov 2017 14:24:48 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 "=== Testing afl image with a very large capacity ===" _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 # success, all done