From nobody Wed Nov 12 10:09:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569577816; cv=none; d=zoho.com; s=zohoarc; b=fLX2beQujzoPkAwaBgkA6YdQACPfnZCV0s4astnSgS4kzS+mhCbjRDTXhh5VduJ0FL4PpT9TpYDJNwcrmjuo5eJ4mxaowzHOhoIT6S7ve0xL3pI0DCAA4m6HAvXcMZdEQ5Px46lvN4ni7BxFbLKENxIqmGNqav26IwtqFxtCj50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569577816; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=B/hNcDDB2OLHGNsXSKM2yVp5bCxSnmV20bRwYfS6WiM=; b=O3r91U4N99Mjo0JzAPL0g3t8tSCH+oeCYdXkjJvMsOELv43P/JIKyKS4Tvs8H+RRpvnLn68TQLDCPeuxNmuPmnd3PzXwIzVEaKS07/Tj5UJ/lTN1bS6/lL497WP6x3T7YeafxvvhGZ7ylXmgE+2qxhIytyuIENNz6v3sIGI8fZ4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569577816578274.77220460496505; Fri, 27 Sep 2019 02:50:16 -0700 (PDT) Received: from localhost ([::1]:49026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDmtC-0001L9-7r for importer@patchew.org; Fri, 27 Sep 2019 05:50:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33553) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDmmZ-0003gR-KN for qemu-devel@nongnu.org; Fri, 27 Sep 2019 05:43:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDmmY-00081Y-9l for qemu-devel@nongnu.org; Fri, 27 Sep 2019 05:43:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35236) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDmmV-0007tX-Ij; Fri, 27 Sep 2019 05:43:19 -0400 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 C297E4FCD9; Fri, 27 Sep 2019 09:43:18 +0000 (UTC) Received: from localhost (ovpn-204-76.brq.redhat.com [10.40.204.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5BA03600C6; Fri, 27 Sep 2019 09:43:18 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 14/18] iotests: Make 110 work with data_file Date: Fri, 27 Sep 2019 11:42:38 +0200 Message-Id: <20190927094242.11152-15-mreitz@redhat.com> In-Reply-To: <20190927094242.11152-1-mreitz@redhat.com> References: <20190927094242.11152-1-mreitz@redhat.com> MIME-Version: 1.0 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]); Fri, 27 Sep 2019 09:43:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The only difference is that the json:{} filename of the image looks different. We actually do not care about that filename in this test, we are only interested in (1) that there is a json:{} filename, and (2) whether the backing filename can be constructed. So just filter out the json:{} data, thus making this test pass both with and without data_file. Signed-off-by: Max Reitz --- tests/qemu-iotests/110 | 7 +++++-- tests/qemu-iotests/110.out | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/110 b/tests/qemu-iotests/110 index f78df0e6e1..34459dcd60 100755 --- a/tests/qemu-iotests/110 +++ b/tests/qemu-iotests/110 @@ -67,6 +67,7 @@ echo # Across blkdebug without a config file, you cannot reconstruct filenames,= so # qemu is incapable of knowing the directory of the top image from the fil= ename # alone. However, using bdrv_dirname(), it should still work. +# (Filter out the json:{} filename so this test works with external data f= iles) TEST_IMG=3D"json:{ 'driver': '$IMGFMT', 'file': { @@ -82,7 +83,8 @@ TEST_IMG=3D"json:{ } ] } -}" _img_info | _filter_img_info | grep -v 'backing file format' +}" _img_info | _filter_img_info | grep -v 'backing file format' \ + | sed -e 's#^image: json:.*#image: json:{ /* filtered */ }#' =20 echo echo '=3D=3D=3D Backing name is always relative to the backed image =3D=3D= =3D' @@ -114,7 +116,8 @@ TEST_IMG=3D"json:{ } ] } -}" _img_info | _filter_img_info | grep -v 'backing file format' +}" _img_info | _filter_img_info | grep -v 'backing file format' \ + | sed -e 's#^image: json:.*#image: json:{ /* filtered */ }#' =20 =20 # success, all done diff --git a/tests/qemu-iotests/110.out b/tests/qemu-iotests/110.out index f60b26390e..f835553a99 100644 --- a/tests/qemu-iotests/110.out +++ b/tests/qemu-iotests/110.out @@ -11,7 +11,7 @@ backing file: t.IMGFMT.base (actual path: TEST_DIR/t.IMGF= MT.base) =20 =3D=3D=3D Non-reconstructable filename =3D=3D=3D =20 -image: json:{"driver": "IMGFMT", "file": {"set-state.0.event": "read_aio",= "image": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "driver": "b= lkdebug", "set-state.0.new_state": 42}} +image: json:{ /* filtered */ } file format: IMGFMT virtual size: 64 MiB (67108864 bytes) backing file: t.IMGFMT.base (actual path: TEST_DIR/t.IMGFMT.base) @@ -22,7 +22,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108= 864 backing_file=3Dt.IMGFMT.b =20 =3D=3D=3D Nodes without a common directory =3D=3D=3D =20 -image: json:{"driver": "IMGFMT", "file": {"children": [{"driver": "file", = "filename": "TEST_DIR/t.IMGFMT"}, {"driver": "file", "filename": "TEST_DIR/= t.IMGFMT.copy"}], "driver": "quorum", "vote-threshold": 1}} +image: json:{ /* filtered */ } file format: IMGFMT virtual size: 64 MiB (67108864 bytes) backing file: t.IMGFMT.base (cannot determine actual path) --=20 2.21.0