qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] iotests: Add test for checking large image files
Date: Tue, 8 Sep 2015 14:21:07 -0600	[thread overview]
Message-ID: <55EF4333.3080703@redhat.com> (raw)
In-Reply-To: <1441742995-11794-3-git-send-email-mreitz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

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 <mreitz@redhat.com>
> ---
>  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 <eblake@redhat.com>

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      reply	other threads:[~2015-09-08 20:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08 20:09 [Qemu-devel] [PATCH 0/2] qcow2: Make size_to_clusters() return int64_t Max Reitz
2015-09-08 20:09 ` [Qemu-devel] [PATCH 1/2] " Max Reitz
2015-09-08 20:17   ` Max Reitz
2015-09-08 20:22   ` Eric Blake
2015-09-08 20:26     ` Max Reitz
2015-09-09  8:45   ` Kevin Wolf
2015-09-09 13:41     ` Max Reitz
2015-09-08 20:09 ` [Qemu-devel] [PATCH 2/2] iotests: Add test for checking large image files Max Reitz
2015-09-08 20:21   ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55EF4333.3080703@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).