From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Eric Blake <eblake@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Krempa <pkrempa@redhat.com>,
qemu-block@nongnu.org, Juan Quintela <quintela@redhat.com>,
qemu-devel@nongnu.org, John Snow <jsnow@redhat.com>
Subject: Re: [PATCH v4 2/4] iotests.py: Add wait_for_runstate()
Date: Thu, 20 Aug 2020 16:56:44 +0200 [thread overview]
Message-ID: <0af603ac-82b2-8270-8e7c-3bd56f38fbfb@redhat.com> (raw)
In-Reply-To: <65e2c000-1de9-78f8-5ac0-6f31319e6f46@virtuozzo.com>
[-- Attachment #1.1: Type: text/plain, Size: 1776 bytes --]
On 20.08.20 16:34, Vladimir Sementsov-Ogievskiy wrote:
> 20.08.2020 17:23, Dr. David Alan Gilbert wrote:
>> * Eric Blake (eblake@redhat.com) wrote:
>>> On 8/18/20 8:32 AM, Max Reitz wrote:
>>>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>>>> ---
>>>> tests/qemu-iotests/iotests.py | 4 ++++
>>>> 1 file changed, 4 insertions(+)
>>>
>>> Reviewed-by: Eric Blake <eblake@redhat.com>
>>>
>>>>
>>>> diff --git a/tests/qemu-iotests/iotests.py
>>>> b/tests/qemu-iotests/iotests.py
>>>> index 717b5b652c..ee93cf22db 100644
>>>> --- a/tests/qemu-iotests/iotests.py
>>>> +++ b/tests/qemu-iotests/iotests.py
>>>> @@ -833,6 +833,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:
>>>> + time.sleep(0.2)
>>>
>>> This looks like it could inf-loop if we have a bug where the status
>>> never
>>> changes as expected; but I guess CI bots have timeouts at higher
>>> layers that
>>> would detect if such a bug sneaks in.
>>
>> Although it might be useful to make sure when such a timeout lands, you
>> know which state you thought you were waiting for.
>>
>> Dave
>>
>
> Timeout class is defined in iotests.py, so we can simply insert
> something like
>
> ... , timeout=60) -> None:
> with Timeout(timeout, f"Timeout waiting for '{runstate}' runstate"):
> ...
Actually, I’m not even using this function here in v4 anymore, so this
patch might as well be dropped.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-08-20 14:58 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 [this message]
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
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=0af603ac-82b2-8270-8e7c-3bd56f38fbfb@redhat.com \
--to=mreitz@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@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).