[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 11/14] iotests: Add _filter_qemu_img_map
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v8 11/14] iotests: Add _filter_qemu_img_map |
Date: |
Mon, 09 Jun 2014 11:51:52 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
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.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> tests/qemu-iotests/common.filter | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/qemu-iotests/common.filter
> b/tests/qemu-iotests/common.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#'
> }
>
> +# 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 <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v8 04/14] blockjob: Introduce block_job_complete_sync(), (continued)
- [Qemu-devel] [PATCH v8 04/14] blockjob: Introduce block_job_complete_sync(), Max Reitz, 2014/06/07
- [Qemu-devel] [PATCH v8 06/14] block/mirror: Improve progress report, Max Reitz, 2014/06/07
- [Qemu-devel] [PATCH v8 07/14] qemu-img: Implement commit like QMP, Max Reitz, 2014/06/07
- [Qemu-devel] [PATCH v8 08/14] qemu-img: Empty image after commit, Max Reitz, 2014/06/07
- [Qemu-devel] [PATCH v8 09/14] qemu-img: Enable progress output for commit, Max Reitz, 2014/06/07
- [Qemu-devel] [PATCH v8 10/14] qemu-img: Specify backing file for commit, Max Reitz, 2014/06/07
- [Qemu-devel] [PATCH v8 11/14] iotests: Add _filter_qemu_img_map, Max Reitz, 2014/06/07
- Re: [Qemu-devel] [PATCH v8 11/14] iotests: Add _filter_qemu_img_map,
Eric Blake <=
- [Qemu-devel] [PATCH v8 12/14] iotests: Add test for backing-chain commits, Max Reitz, 2014/06/07
- [Qemu-devel] [PATCH v8 13/14] iotests: Add test for qcow2's bdrv_make_empty, Max Reitz, 2014/06/07
- [Qemu-devel] [PATCH v8 14/14] iotests: Omit length/offset test in 040 and 041, Max Reitz, 2014/06/07
- Re: [Qemu-devel] [PATCH v8 00/14] qemu-img: Implement commit like QMP, Max Reitz, 2014/06/27