qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] iotests: Add test for checking


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] iotests: Add test for checking large image files
Date: Tue, 8 Sep 2015 14:21:07 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 09/08/2015 02:09 PM, Max Reitz wrote:
> Add a test for checking a qcow2 file with a multiple of 2^32 clusters.
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  tests/qemu-iotests/138     | 73 
> ++++++++++++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/138.out |  9 ++++++
>  tests/qemu-iotests/group   |  1 +
>  3 files changed, 83 insertions(+)
>  create mode 100755 tests/qemu-iotests/138
>  create mode 100644 tests/qemu-iotests/138.out
> 

> +# Put the data cluster at a multiple of 2 TB, resulting in the image 
> apparently
> +# having a multiple of 2^32 clusters
> +# (To be more specific: It is at 32 PB)
> +poke_file "$TEST_IMG" 2048 "\x80\x80\x00\x00\x00\x00\x00\x00"
> +
> +# An offset of 32 PB results in qemu-img check having to allocate an 
> in-memory
> +# refcount table of 128 TB (16 bit refcounts, 512 byte clusters).
> +# This should be generally too much for any system and thus fail.
> +# What this test is checking is that the qcow2 driver actually tries to 
> allocate
> +# such a large amount of memory (and is consequently aborting) instead of 
> having
> +# truncated the cluster count somewhere (which would result in much less 
> memory
> +# being allocated and then a segfault occuring).

s/occuring/occurring/

With the typo fixed,
Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]