qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Krempa <pkrempa@redhat.com>,
	Juan Quintela <quintela@redhat.com>, John Snow <jsnow@redhat.com>,
	qemu-devel@nongnu.org,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [PATCH v2 2/3] iotests.py: Add wait_for_runstate()
Date: Tue, 21 Jul 2020 10:05:11 +0200	[thread overview]
Message-ID: <88749571-6e01-44c0-eaa7-ca5bb60d0ae5@redhat.com> (raw)
In-Reply-To: <e018b44e-2597-5cca-79af-272df950e1d7@virtuozzo.com>


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

On 20.07.20 18:46, Vladimir Sementsov-Ogievskiy wrote:
> 16.07.2020 16:53, Max Reitz wrote:
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>>   tests/qemu-iotests/iotests.py | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/tests/qemu-iotests/iotests.py
>> b/tests/qemu-iotests/iotests.py
>> index 3590ed78a0..fb240a334c 100644
>> --- a/tests/qemu-iotests/iotests.py
>> +++ b/tests/qemu-iotests/iotests.py
>> @@ -803,6 +803,10 @@ class VM(qtest.QEMUQtestMachine):
>>                      'Found node %s under %s (but expected %s)' % \
>>                      (node['name'], path, expected_node)
>>   +    def wait_for_runstate(self, runstate: str) -> None:
>> +        while self.qmp('query-status')['return']['status'] != runstate:
>> +            pass
> 
> don't we need something like time.sleep(0.5) instead of just pass?

Hm.  Maybe not “need”?  I thought this polling would last a short time
anyway, so it wouldn’t matter if there was high CPU usage during that time.

OTOH, I don’t think a short sleep would hurt.

> Anyway:
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> 
>> +
>>   index_re = re.compile(r'([^\[]+)\[([^\]]+)\]')
>>     class QMPTestCase(unittest.TestCase):
>>
> 
> 



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

  reply	other threads:[~2020-07-21  8:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 13:53 [PATCH v2 0/3] migration: Add block-bitmap-mapping parameter Max Reitz
2020-07-16 13:53 ` [PATCH v2 1/3] " Max Reitz
2020-07-20 16:31   ` Vladimir Sementsov-Ogievskiy
2020-07-21  8:02     ` Max Reitz
2020-07-22 11:07       ` Vladimir Sementsov-Ogievskiy
2020-07-22  9:06   ` Dr. David Alan Gilbert
2020-07-16 13:53 ` [PATCH v2 2/3] iotests.py: Add wait_for_runstate() Max Reitz
2020-07-20 16:46   ` Vladimir Sementsov-Ogievskiy
2020-07-21  8:05     ` Max Reitz [this message]
2020-07-16 13:53 ` [PATCH v2 3/3] iotests: Test node/bitmap aliases during migration Max Reitz
2020-07-20 18:02   ` Vladimir Sementsov-Ogievskiy
2020-07-21  8:33     ` Max Reitz
2020-07-22  9:17 ` [PATCH v2 0/3] migration: Add block-bitmap-mapping parameter Dr. David Alan Gilbert

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=88749571-6e01-44c0-eaa7-ca5bb60d0ae5@redhat.com \
    --to=mreitz@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@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).