[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v12 3/3] qcow2: list of bitmaps new test 242
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH v12 3/3] qcow2: list of bitmaps new test 242 |
Date: |
Tue, 5 Feb 2019 14:40:24 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 2/5/19 2:14 PM, Andrey Shinkevich wrote:
> A new test file 242 added to the qemu-iotests set. It checks
> the format of qcow2 specific information for the new added
> section that lists details of bitmaps.
>
> Signed-off-by: Andrey Shinkevich <address@hidden>
> ---
> +
> +disk = file_path('disk')
> +chunk = 256*1024
> +bitmap_flag_unknown = 1 << 2
> +flag_offset = 0x10002f
> +
Fragile if something else changes where this cluster gets allocated, but
hopefully such a change would be caught quickly by the iotest failure;
so I'm fine with it.
> +
> +Test 5
> +Write bitmap flag '0x4' into the QCOW2 image at offset 1048623
> +qemu-img: Could not open 'TEST_IMG': Bitmap 'bitmap-2' doesn't satisfy the
> constraints
> +
> +Unset the unknown bitmap flag '0x4' in the bitmap directory entry:
Perhaps the error message could be made more informative, but that's
outside the scope of this patch. Thanks for adding that negative test;
it's harder to remember to be resilient to bad input, and having
testsuite coverage of intentionally bad files is a good thing.
Reviewed-by: Eric Blake <address@hidden>
I'll wait a couple days to see if any other reviewers speak up; at which
point, I'll be happy to queue this series through my NBD tree, if no one
else picks it up sooner (John may pick it up through his bitmaps tree).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature