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