[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v12 06/10] iotests: Improve _filter_qemu_img_map
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v12 06/10] iotests: Improve _filter_qemu_img_map |
Date: |
Fri, 5 May 2017 22:58:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 |
On 04.05.2017 05:07, Eric Blake wrote:
> Although _filter_qemu_img_map documents that it scrubs offsets, it
> was only doing so for human mode. Of the existing tests using the
> filter (97, 122, 150, 154, 176), two of them are affected, but it
> does not hurt the validity of the tests to not require particular
> mappings (another test, 66, uses offsets but intentionally does not
> pass through _filter_qemu_img_map, because it checks that offsets
> are unchanged before and after an operation).
>
> Another justification for this patch is that it will allow a future
> patch to utilize 'qemu-img map --output=json' to check the status of
> preallocated zero clusters without regards to the mapping (since
> the qcow2 mapping can be very sensitive to the chosen cluster size,
> when preallocation is not in use).
>
> Signed-off-by: Eric Blake <address@hidden>
>
> ---
> v12: new patch
> ---
> tests/qemu-iotests/common.filter | 4 +++-
> tests/qemu-iotests/122.out | 16 ++++++++--------
> tests/qemu-iotests/154.out | 30 +++++++++++++++---------------
> 3 files changed, 26 insertions(+), 24 deletions(-)
>
> diff --git a/tests/qemu-iotests/common.filter
> b/tests/qemu-iotests/common.filter
> index f58548d..2c14f15 100644
> --- a/tests/qemu-iotests/common.filter
> +++ b/tests/qemu-iotests/common.filter
> @@ -152,10 +152,12 @@ _filter_img_info()
> -e "/log_size: [0-9]\\+/d"
> }
>
> -# filter out offsets and file names from qemu-img map
> +# filter out offsets and file names from qemu-img map; good for both
> +# human and json output
> _filter_qemu_img_map()
> {
> sed -e 's/\([0-9a-fx]* *[0-9a-fx]* *\)[0-9a-fx]* */\1/g' \
> + -e 's/"offset": [0-9]\+/"offset": OFFSET/g' \> -e 's/Mapped to
> *//' | _filter_testdir | _filter_imgfmt
This makes my OCD very sad.
With the alignment fixed:
Reviewed-by: Max Reitz <address@hidden>
(Without this fixed: Will-change-when-applying-and-then-add-the-R-b)
> }
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH v12 04/10] qcow2: Make distinction between zero cluster types obvious, (continued)
- [Qemu-block] [PATCH v12 07/10] iotests: Add test 179 to cover write zeroes with unmap, Eric Blake, 2017/05/03
- [Qemu-block] [PATCH v12 09/10] qcow2: Assert that cluster operations are aligned, Eric Blake, 2017/05/03
- [Qemu-block] [PATCH v12 10/10] qcow2: Discard/zero clusters by byte count, Eric Blake, 2017/05/03
- [Qemu-block] [PATCH v12 08/10] qcow2: Optimize write zero of unaligned tail cluster, Eric Blake, 2017/05/03
- [Qemu-block] [PATCH v12 06/10] iotests: Improve _filter_qemu_img_map, Eric Blake, 2017/05/03
- Re: [Qemu-block] [PATCH v12 06/10] iotests: Improve _filter_qemu_img_map,
Max Reitz <=
- Re: [Qemu-block] [PATCH v12 00/10] qcow2 zero-cluster tweaks [was add blkdebug tests], Max Reitz, 2017/05/05