From: John Snow <jsnow@redhat.com>
To: Eric Blake <eblake@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
vsementsov@virtuozzo.com, Markus Armbruster <armbru@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 5/5] iotests: add iotest 236 for testing bitmap merge
Date: Wed, 19 Dec 2018 21:01:46 -0500 [thread overview]
Message-ID: <6ed0ffb2-b7b7-10e1-eed4-9f521515bfc8@redhat.com> (raw)
In-Reply-To: <bdcee774-5139-894e-634b-924728accb6f@redhat.com>
On 12/19/18 2:34 PM, Eric Blake wrote:
> On 12/18/18 7:52 PM, John Snow wrote:
>> New interface, new smoke test.
>> ---
>> tests/qemu-iotests/236 | 131 ++++++++++++++++++++++++
>> tests/qemu-iotests/236.out | 198 +++++++++++++++++++++++++++++++++++++
>> tests/qemu-iotests/group | 1 +
>> 3 files changed, 330 insertions(+)
>> create mode 100755 tests/qemu-iotests/236
>> create mode 100644 tests/qemu-iotests/236.out
>>
>
>> +
>> + log('')
>> + log('--- Disabling B & Adding C ---\n')
>> + vm.qmp_log("transaction", indent=2, actions=[
>> + { "type": "block-dirty-bitmap-disable",
>> + "data": { "node": "drive0", "name": "bitmapB" }},
>> + { "type": "block-dirty-bitmap-add",
>> + "data": { "node": "drive0", "name": "bitmapC",
>> + "granularity": granularity }},
>> + # Purely extraneous, but test that it works:
>> + { "type": "block-dirty-bitmap-disable",
>> + "data": { "node": "drive0", "name": "bitmapC" }},
>> + { "type": "block-dirty-bitmap-enable",
>> + "data": { "node": "drive0", "name": "bitmapC" }},
>> + ])
>
> One other possible addition just before this point:
>
> qmp_log("transaction", indent=2, actions=[
> { "type": "block-dirty-bitmap-disable",
> "data": { "node": "drive0", "name": "bitmapB" }},
> { "type": "block-dirty-bitmap-add",
> "data": { "node": "drive0", "name": "bitmapC",
> "granularity": granularity }},
> { "type": "block-dirty-bitmap-remove",
> "data": { "node": "drive0", "name": "bitmapA" }},
> { "type": "abort", "data": {}}
> ])
>
> to check that we properly undo things on an aborted transaction (B
> should still be enabled, C should not exist, and A should not be damaged).
>
Good suggestion, but remove is not a transaction item. I'll substitute
for clear, which should showcase the same effects.
>> + # A and D should be equivalent>> + # Some formats round the size of the disk, so don't print the
>> checksums.
>> + check_a = vm.qmp('x-debug-block-dirty-bitmap-sha256',
>> + node="drive0", name="bitmapA")['return']['sha256']
>> + check_b = vm.qmp('x-debug-block-dirty-bitmap-sha256',
>> + node="drive0", name="bitmapD")['return']['sha256']
>> + assert(check_a == check_b)
>
> Image agnostic also means that you avoid an 32- vs. 64-bit platform
> discrepancies (we've had issues in the past where the sum is different
> for some image sizes, because the bitmap is always in terms of 'long's,
> but there is one less 'long' in a 32-bit bitmap for the disk size).
> Makes sense.
>
> Also, I don't see any tests of block-dirty-bitmap-remove - this would be
> a good point in the test to insert a final cleanup.
>
OK, done.
>
>> +++ b/tests/qemu-iotests/group
>> @@ -233,3 +233,4 @@
>> 233 auto quick
>> 234 auto quick migration
>> 235 auto quick
>> +236 auto quick
>> \ No newline at end of file
>
> Umm - what's that still doing here?
>
>
:whistles:
prev parent reply other threads:[~2018-12-20 2:02 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 1:52 [Qemu-devel] [PATCH v4 0/5] bitmaps: remove x- prefix from QMP api Part2 John Snow
2018-12-19 1:52 ` [Qemu-devel] [PATCH v4 1/5] iotests: add qmp recursive sorting function John Snow
2018-12-19 10:20 ` Vladimir Sementsov-Ogievskiy
2018-12-19 17:55 ` John Snow
2018-12-19 18:50 ` Eric Blake
2018-12-19 18:52 ` Eric Blake
2018-12-19 18:57 ` John Snow
2018-12-19 19:19 ` Eric Blake
2018-12-19 19:47 ` John Snow
2018-12-19 1:52 ` [Qemu-devel] [PATCH v4 2/5] iotests: remove default filters from qmp_log John Snow
2018-12-19 10:58 ` Vladimir Sementsov-Ogievskiy
2018-12-19 1:52 ` [Qemu-devel] [PATCH v4 3/5] iotests: change qmp_log filters to expect QMP objects only John Snow
2018-12-19 11:07 ` Vladimir Sementsov-Ogievskiy
2018-12-19 11:27 ` Vladimir Sementsov-Ogievskiy
2018-12-19 17:29 ` John Snow
2018-12-19 19:01 ` Eric Blake
2018-12-19 19:52 ` John Snow
2018-12-20 9:33 ` Vladimir Sementsov-Ogievskiy
2018-12-19 18:35 ` John Snow
2018-12-20 9:11 ` Vladimir Sementsov-Ogievskiy
2018-12-19 1:52 ` [Qemu-devel] [PATCH v4 4/5] iotests: implement pretty-print for log and qmp_log John Snow
2018-12-19 1:52 ` [Qemu-devel] [PATCH v4 5/5] iotests: add iotest 236 for testing bitmap merge John Snow
2018-12-19 19:34 ` Eric Blake
2018-12-20 2:01 ` John Snow [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=6ed0ffb2-b7b7-10e1-eed4-9f521515bfc8@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.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).