From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
Max Reitz <mreitz@redhat.com>,
qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Krempa <pkrempa@redhat.com>,
Juan Quintela <quintela@redhat.com>,
qemu-devel@nongnu.org,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
John Snow <jsnow@redhat.com>
Subject: Re: [PATCH v4 4/4] iotests: Test node/bitmap aliases during migration
Date: Thu, 20 Aug 2020 19:44:14 -0500 [thread overview]
Message-ID: <d5800911-0068-8810-f7e0-ab2b10f949b2@redhat.com> (raw)
In-Reply-To: <b1ab8e28-f5ad-1cde-a706-02e4b32e1a0a@virtuozzo.com>
On 8/20/20 10:49 AM, Vladimir Sementsov-Ogievskiy wrote:
> # MYPYPATH=../../python/ mypy 300
> 300:154: error: Item "None" of "Optional[Match[Any]]" has no attribute
> "group"
> Found 1 error in 1 file (checked 1 source file)
>
> - the only complain. Suggest a fix:
>
> diff --git a/tests/qemu-iotests/300 b/tests/qemu-iotests/300
> index c6d86b1dbc..0241903743 100755
> --- a/tests/qemu-iotests/300
> +++ b/tests/qemu-iotests/300
> @@ -148,11 +148,11 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase):
> result = vm.qmp('human-monitor-command',
> command_line='info migrate_parameters')
>
> - hmp_mapping = re.search(r'^block-bitmap-mapping:\r?(\n
> .*)*\n',
> - result['return'], flags=re.MULTILINE)
> + m = re.search(r'^block-bitmap-mapping:\r?(\n .*)*\n',
> + result['return'], flags=re.MULTILINE)
> + hmp_mapping = m.group(0).replace('\r', '') if m else None
>
> - self.assertEqual(hmp_mapping.group(0).replace('\r', ''),
> - self.to_hmp_mapping(mapping))
> + self.assertEqual(hmp_mapping, self.to_hmp_mapping(mapping))
> else:
> self.assert_qmp(result, 'error/desc', error)
Thanks; I'll fold that in to v5.
>
> ===
>
> # flake8 300
> 300:24:1: F401 'time' imported but unused
> 300:34:1: E302 expected 2 blank lines, found 1
> 300:42:67: E502 the backslash is redundant between brackets
> 300:47:67: E502 the backslash is redundant between brackets
> 300:67:53: E502 the backslash is redundant between brackets
> 300:122:9: E125 continuation line with same indent as next logical line
> 300:134:9: E125 continuation line with same indent as next logical line
> 300:185:52: E502 the backslash is redundant between brackets
> 300:186:72: E502 the backslash is redundant between brackets
> 300:285:77: E502 the backslash is redundant between brackets
> 300:305:77: E502 the backslash is redundant between brackets
> 300:306:78: E502 the backslash is redundant between brackets
> 300:330:77: E502 the backslash is redundant between brackets
> 300:350:77: E502 the backslash is redundant between brackets
> 300:385:57: E502 the backslash is redundant between brackets
> 300:386:59: E502 the backslash is redundant between brackets
> 300:387:67: E502 the backslash is redundant between brackets
> 300:412:78: E502 the backslash is redundant between brackets
> 300:425:78: E502 the backslash is redundant between brackets
> 300:435:78: E502 the backslash is redundant between brackets
> 300:436:76: E502 the backslash is redundant between brackets
> 300:451:66: E502 the backslash is redundant between brackets
> 300:473:78: E502 the backslash is redundant between brackets
> 300:474:79: E502 the backslash is redundant between brackets
> 300:488:78: E502 the backslash is redundant between brackets
> 300:489:77: E502 the backslash is redundant between brackets
>
> - I post it just because ALE plugin in vim highlights all these things
> for me. Up to you, I don't ask you to fix it.
Seems like an easy enough touchup to make.
>> + def test_alias_on_both_migration(self) -> None:
>> + src_map = self.mapping(self.src_node_name, 'node-alias',
>> + self.src_bmap_name, 'bmap-alias')
>> +
>> + dst_map = self.mapping(self.dst_node_name, 'node-alias',
>> + self.dst_bmap_name, 'bmap-alias')
>> +
>> + self.set_mapping(self.vm_a, src_map)
>> + self.set_mapping(self.vm_b, dst_map)
>> + self.migrate()
>> + self.verify_dest_error(None)
>
> Hmm, probably verify_dest_error() should be called from migrate(), as
> you call it (almost) always after migrate()
This one I did not touch; it can be a followup patch if desired.
>
>> +
>> +
>
> [..]
>
>> + def test_unused_mapping_on_dst(self) -> None:
>> + # Let the source not send any bitmaps
>> + self.set_mapping(self.vm_a, [])
>> +
>> + # Establish some mapping on the destination
>> + self.set_mapping(self.vm_b, [])
>
> Seems, you wanted to specify non-empty mapping for vm_b, yes?
> With any non-empty mapping here, just to better correspond to the comments:
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>
> (or keep this case with both mappings empty, and add one similar with
> empty mapping only on src)
Adding another case will now have to be a separate patch. At any rate,
I've taken the liberty of including your R-b in my staging tree for the
pending pull request, let me know if I should drop it.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-08-21 0:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 13:32 [PATCH v4 0/4] migration: Add block-bitmap-mapping parameter Max Reitz
2020-08-18 13:32 ` [PATCH v4 1/4] " Max Reitz
2020-08-20 1:17 ` Eric Blake
2020-08-20 12:57 ` Max Reitz
2020-08-20 12:58 ` Vladimir Sementsov-Ogievskiy
2020-08-20 13:32 ` Max Reitz
2020-08-18 13:32 ` [PATCH v4 2/4] iotests.py: Add wait_for_runstate() Max Reitz
2020-08-20 1:19 ` Eric Blake
2020-08-20 14:23 ` Dr. David Alan Gilbert
2020-08-20 14:34 ` Vladimir Sementsov-Ogievskiy
2020-08-20 14:56 ` Max Reitz
2020-08-20 13:36 ` Vladimir Sementsov-Ogievskiy
2020-08-18 13:32 ` [PATCH v4 3/4] iotests.py: Let wait_migration() return on failure Max Reitz
2020-08-20 1:21 ` Eric Blake
2020-08-20 13:42 ` Vladimir Sementsov-Ogievskiy
2020-08-18 13:32 ` [PATCH v4 4/4] iotests: Test node/bitmap aliases during migration Max Reitz
2020-08-20 1:58 ` Eric Blake
2020-08-20 13:17 ` Max Reitz
2020-08-20 13:52 ` Vladimir Sementsov-Ogievskiy
2020-08-20 15:49 ` Vladimir Sementsov-Ogievskiy
2020-08-21 0:44 ` Eric Blake [this message]
2020-08-21 11:36 ` Vladimir Sementsov-Ogievskiy
2020-08-21 8:09 ` 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=d5800911-0068-8810-f7e0-ab2b10f949b2@redhat.com \
--to=eblake@redhat.com \
--cc=dgilbert@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--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).