qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Subject: Re: [PATCH v2 4/4] iotests: add 282 luks qemu-img measure test
Date: Tue, 14 Jan 2020 16:48:58 +0100	[thread overview]
Message-ID: <e12a1f59-f72b-921b-d211-0931c1682eb9@redhat.com> (raw)
In-Reply-To: <20200109111012.559052-5-stefanha@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 1530 bytes --]

On 09.01.20 12:10, Stefan Hajnoczi wrote:
> This test exercises the block/crypto.c "luks" block driver
> .bdrv_measure() code.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  tests/qemu-iotests/282     | 93 ++++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/282.out | 30 ++++++++++++
>  tests/qemu-iotests/group   |  1 +
>  3 files changed, 124 insertions(+)
>  create mode 100755 tests/qemu-iotests/282
>  create mode 100644 tests/qemu-iotests/282.out

[...]

> diff --git a/tests/qemu-iotests/282.out b/tests/qemu-iotests/282.out
> new file mode 100644
> index 0000000000..8f4737aef7
> --- /dev/null
> +++ b/tests/qemu-iotests/282.out
> @@ -0,0 +1,30 @@
> +QA output created by 282
> +== measure 1G image file ==
> +
> +required size: 2068480
> +fully allocated size: 1075810304
> +
> +== create 1G image file (size should be no greater than measured) ==
> +
> +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
> +image file size in bytes: 1075810304

It clearly is greater than measured, though.  (Because zero data
generally isn’t encrypted to be zero.)

I also wonder whether it even makes much sense to check the file length,
because I suppose we’re actually interested in how much is allocated.
That is, I think it’s fine to have the file length be greater than
what’s been measured, but the allocated file size shouldn’t be.

But then again the allocated file size may well be greater because of
filesystem shenanigans...

Max


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

      reply	other threads:[~2020-01-14 15:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 11:10 [PATCH v2 0/4] luks: add qemu-img measure support Stefan Hajnoczi
2020-01-09 11:10 ` [PATCH v2 1/4] luks: extract block_crypto_calculate_payload_offset() Stefan Hajnoczi
2020-01-14 15:25   ` Max Reitz
2020-01-15 13:40     ` Stefan Hajnoczi
2020-01-15 14:35       ` Max Reitz
2020-01-09 11:10 ` [PATCH v2 2/4] luks: implement .bdrv_measure() Stefan Hajnoczi
2020-01-14 15:43   ` Max Reitz
2020-01-15 13:41     ` Stefan Hajnoczi
2020-01-09 11:10 ` [PATCH v2 3/4] qemu-img: allow qemu-img measure --object without a filename Stefan Hajnoczi
2020-01-14 15:44   ` Max Reitz
2020-01-09 11:10 ` [PATCH v2 4/4] iotests: add 282 luks qemu-img measure test Stefan Hajnoczi
2020-01-14 15:48   ` Max Reitz [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=e12a1f59-f72b-921b-d211-0931c1682eb9@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).