From: Max Reitz <mreitz@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Lieven <pl@kamp.de>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 11/21] iotests: Prepare for refcount_width option
Date: Wed, 12 Nov 2014 09:41:47 +0100 [thread overview]
Message-ID: <54631D4B.200@redhat.com> (raw)
In-Reply-To: <54624E22.5060801@redhat.com>
On 2014-11-11 at 18:57, Eric Blake wrote:
> On 11/10/2014 06:45 AM, Max Reitz wrote:
>> Some tests do not work well with certain refcount widths (i.e. you
>> cannot create internal snapshots with refcount_width=1), so make those
>> widths unsupported.
>>
>> Furthermore, add another filter to _filter_img_create in common.filter
>> which filters out the refcount_width value.
>>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>> tests/qemu-iotests/007 | 4 ++++
>> tests/qemu-iotests/015 | 1 +
>> tests/qemu-iotests/026 | 11 +++++++++++
>> tests/qemu-iotests/029 | 1 +
>> tests/qemu-iotests/051 | 1 +
>> tests/qemu-iotests/058 | 1 +
>> tests/qemu-iotests/067 | 7 +++++++
>> tests/qemu-iotests/079 | 1 +
>> tests/qemu-iotests/080 | 1 +
>> tests/qemu-iotests/089 | 7 +++++++
>> tests/qemu-iotests/090 | 1 +
>> tests/qemu-iotests/108 | 6 ++++++
>> tests/qemu-iotests/common.filter | 3 ++-
>> 13 files changed, 44 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/qemu-iotests/007 b/tests/qemu-iotests/007
>> index fe1a743..de39d1b 100755
>> --- a/tests/qemu-iotests/007
>> +++ b/tests/qemu-iotests/007
>> @@ -43,6 +43,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>> _supported_fmt qcow2
>> _supported_proto generic
>> _supported_os Linux
>> +# refcount_width must be at least 4 bits so we can create ten internal snapshots
>> +# (1 bit supports none, 2 bits support three, 4 bits support 15)
> Feels like an off-by-one comment. A width of 1 bit support a max
> refcount of 1 (therefore no snapshots), a width of 2 bits supports a max
> refcount of 3 (therefore 2 snapshots in addition to the original), a
> width of 4 bits supports a max refcount of 15 (therefore only 14 snapshots).
Telling you how to correctly get to the right maximum refcount and then
getting it wrong myself is a bit embarrassing...
>> +++ b/tests/qemu-iotests/067
>> @@ -35,6 +35,13 @@ status=1 # failure is the default!
>> _supported_fmt qcow2
>> _supported_proto file
>> _supported_os Linux
>> +# Because this would change the output of query-block
>> +_unsupported_imgopts 'refcount_width=1[^0-9]' \
>> + 'refcount_width=2[^0-9]' \
>> + 'refcount_width=4[^0-9]' \
>> + 'refcount_width=8[^0-9]' \
>> + 'refcount_width=32[^0-9]' \
>> + 'refcount_width=64[^0-9]'
> It might be more compact to exploit globbing and just say:
>
> _unsupported_imgopts 'refcount_width=?[^6]'
>
> which leaves refcount_width=16 as the only pattern that doesn't match
> the glob. But that feels more fragile, so I can live with your longer list.
Well, maybe using ?[^6] is even better because this isn't about ruling
out the options 1, 2, 4, 8, 32 and 64, but rather only allowing 16.
Thus, using ?[^6] seems more explicit.
>> +++ b/tests/qemu-iotests/089
>> @@ -41,6 +41,13 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>> _supported_fmt qcow2
>> _supported_proto file
>> _supported_os Linux
>> +# Because this would change the output of qemu_io -c info
>> +_unsupported_imgopts 'refcount_width=1[^0-9]' \
> I like how you give reasons for some tests...
>
>> +++ b/tests/qemu-iotests/090
>> @@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>> _supported_fmt qcow2
>> _supported_proto file nfs
>> _supported_os Linux
>> +_unsupported_imgopts 'refcount_width=1[^0-9]'
> ...so why not do it for all tests?
Because the ones I didn't give reasons for are the ones I spotted first,
so they seemed obvious to me. ;-) (I wondered the same thing when
looking through the patches before submitting them, but decided to just
leave it at that)
I'll add a comment for every test.
> At any rate, the patch makes sense, so whether or not you tweak comments,
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> I'm assuming that later in the series you add a test that explicitly
> covers the error message given when a refcount_order=0 (width=1) image
> is attempted to be used with snapshots, since that will fail (internal
> snapshots are simply not possible without a refcount that can't exceed 1).
Well, as you yourself explained, they are indeed possible if done right
(immediate COW). But that'll go into another series.
Max
next prev parent reply other threads:[~2014-11-12 8:42 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 13:45 [Qemu-devel] [PATCH 00/21] qcow2: Support refcount orders != 4 Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 01/21] qcow2: Add two new fields to BDRVQcowState Max Reitz
2014-11-10 19:00 ` Eric Blake
2014-11-10 13:45 ` [Qemu-devel] [PATCH 02/21] qcow2: Add refcount_width to format-specific info Max Reitz
2014-11-10 19:06 ` Eric Blake
2014-11-11 8:11 ` Max Reitz
2014-11-11 15:49 ` Eric Blake
2014-11-10 13:45 ` [Qemu-devel] [PATCH 03/21] qcow2: Use 64 bits for refcount values Max Reitz
2014-11-10 20:59 ` Eric Blake
2014-11-11 8:12 ` Max Reitz
2014-11-11 9:22 ` Kevin Wolf
2014-11-11 9:25 ` Max Reitz
2014-11-11 9:26 ` Max Reitz
2014-11-11 9:36 ` Kevin Wolf
2014-11-10 13:45 ` [Qemu-devel] [PATCH 04/21] qcow2: Respect error in qcow2_alloc_bytes() Max Reitz
2014-11-10 21:05 ` Eric Blake
2014-11-10 13:45 ` [Qemu-devel] [PATCH 05/21] qcow2: Refcount overflow and qcow2_alloc_bytes() Max Reitz
2014-11-10 21:12 ` Eric Blake
2014-11-11 8:22 ` Max Reitz
2014-11-11 16:13 ` Eric Blake
2014-11-11 16:18 ` Max Reitz
2014-11-11 19:49 ` Eric Blake
2014-11-12 8:52 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 06/21] qcow2: Helper function for refcount modification Max Reitz
2014-11-10 22:30 ` Eric Blake
2014-11-11 8:35 ` Max Reitz
2014-11-11 9:43 ` Max Reitz
2014-11-11 10:56 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 07/21] qcow2: Helper for refcount array size calculation Max Reitz
2014-11-10 22:49 ` Eric Blake
2014-11-11 8:37 ` Max Reitz
2014-11-11 10:08 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 08/21] qcow2: More helpers for refcount modification Max Reitz
2014-11-11 0:29 ` Eric Blake
2014-11-11 8:42 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 09/21] qcow2: Open images with refcount order != 4 Max Reitz
2014-11-10 17:03 ` Eric Blake
2014-11-10 17:06 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 10/21] qcow2: refcount_order parameter for qcow2_create2 Max Reitz
2014-11-11 5:40 ` Eric Blake
2014-11-11 8:48 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 11/21] iotests: Prepare for refcount_width option Max Reitz
2014-11-11 17:57 ` Eric Blake
2014-11-12 8:41 ` Max Reitz [this message]
2014-11-10 13:45 ` [Qemu-devel] [PATCH 12/21] qcow2: Allow creation with refcount order != 4 Max Reitz
2014-11-11 18:05 ` Eric Blake
2014-11-12 8:47 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 13/21] block: Add opaque value to the amend CB Max Reitz
2014-11-11 18:08 ` Eric Blake
2014-11-10 13:45 ` [Qemu-devel] [PATCH 14/21] qcow2: Use error_report() in qcow2_amend_options() Max Reitz
2014-11-11 18:11 ` Eric Blake
2014-11-12 8:47 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 15/21] qcow2: Use abort() instead of assert(false) Max Reitz
2014-11-11 18:12 ` Eric Blake
2014-11-12 8:48 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 16/21] qcow2: Split upgrade/downgrade paths for amend Max Reitz
2014-11-11 18:14 ` Eric Blake
2014-11-10 13:45 ` [Qemu-devel] [PATCH 17/21] qcow2: Use intermediate helper CB " Max Reitz
2014-11-11 21:05 ` Eric Blake
2014-11-12 9:10 ` Max Reitz
2014-11-10 13:45 ` [Qemu-devel] [PATCH 18/21] qcow2: Add function for refcount order amendment Max Reitz
2014-11-12 4:15 ` Eric Blake
2014-11-12 9:55 ` Max Reitz
2014-11-12 13:50 ` Eric Blake
2014-11-12 14:19 ` Eric Blake
2014-11-12 14:21 ` Max Reitz
2014-11-12 17:45 ` Max Reitz
2014-11-12 20:21 ` Eric Blake
2014-11-10 13:45 ` [Qemu-devel] [PATCH 19/21] qcow2: Invoke refcount order amendment function Max Reitz
2014-11-12 4:36 ` Eric Blake
2014-11-10 13:45 ` [Qemu-devel] [PATCH 20/21] qcow2: Point to amend function in check Max Reitz
2014-11-12 4:38 ` Eric Blake
2014-11-10 13:45 ` [Qemu-devel] [PATCH 21/21] iotests: Add test for different refcount widths Max Reitz
2014-11-11 19:53 ` Eric Blake
2014-11-12 8:58 ` Max Reitz
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=54631D4B.200@redhat.com \
--to=mreitz@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=pl@kamp.de \
--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).