From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu3jj-0003qm-De for qemu-devel@nongnu.org; Mon, 09 Jun 2014 13:52:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wu3je-0000bX-GQ for qemu-devel@nongnu.org; Mon, 09 Jun 2014 13:51:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu3je-0000bH-6h for qemu-devel@nongnu.org; Mon, 09 Jun 2014 13:51:54 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s59Hprqj020991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 9 Jun 2014 13:51:53 -0400 Message-ID: <5395F438.6030508@redhat.com> Date: Mon, 09 Jun 2014 11:51:52 -0600 From: Eric Blake MIME-Version: 1.0 References: <1402167080-20316-1-git-send-email-mreitz@redhat.com> <1402167080-20316-12-git-send-email-mreitz@redhat.com> In-Reply-To: <1402167080-20316-12-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eC2bqHOXLsVMCGWaT3vupHO0axKLDbKdp" Subject: Re: [Qemu-devel] [PATCH v8 11/14] iotests: Add _filter_qemu_img_map List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eC2bqHOXLsVMCGWaT3vupHO0axKLDbKdp Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/07/2014 12:51 PM, Max Reitz wrote: > As different image formats most probably map guest addresses to > different host addresses, add a filter to filter the host addresses out= ; > also, the image filename should be filtered. >=20 > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/common.filter | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/comm= on.filter > index a04df7f..8b14edb 100644 > --- a/tests/qemu-iotests/common.filter > +++ b/tests/qemu-iotests/common.filter > @@ -170,5 +170,12 @@ _filter_qmp() > -e 's#^{"QMP":.*}$#QMP_VERSION#' > } > =20 > +# filter out offsets and file names from qemu-img map > +_filter_qemu_img_map() > +{ > + sed -e 's/\([0-9a-fx]* *[0-9a-fx]* *\)[0-9a-fx]* */\1/g' \ The 'g' modifier to the s/// is not necessary, since there are no lines output by 'qemu-img map' that contain more than 3 hex numbers. But it doesn't hurt either. > + -e 's/Mapped to *//' | _filter_testdir | _filter_imgfmt > +} A cut by column number may have been shorter to write, but this does indeed appear to do the trick for all but a perverse person that names their backing files with substrings that include something like '/path/to/Mapped to gotcha/'. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --eC2bqHOXLsVMCGWaT3vupHO0axKLDbKdp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTlfQ4AAoJEKeha0olJ0NqH9YH/3BK7z8Hr3DxWm62ZmXimK06 LsF5jolR5+0yUutaBhqVxsYMAJAf2smIceyeKvao1owKj0k3jGTWAiFgnODs6ZMf DiCKwAOKsbwcPv3t7DfJRD0+22aCga7GPrBV9shamJIdG0dOeYIdMpDnGz4tfh1h TXoqP6T4wrVawY1mxtVuYDuj4Zu7e1N2U/TGSGWjpx/73yd/MAC502LsGykMMmGH 3kpkHxikW99ZBzOI5JpCGyLQjY5pHsjOr5NwTgUcJDJue84KDn7FCq45Mu4UZyrF 8UsITwDd6JhK+NYAeRN1jyqAIcpEZZczmm89YSUGCoQ8t46Y4DWfkzJM4PWZApU= =1A1z -----END PGP SIGNATURE----- --eC2bqHOXLsVMCGWaT3vupHO0axKLDbKdp--