|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [PATCH v2 2/3] iotests.py: Add wait_for_runstate() |
Date: | Mon, 20 Jul 2020 19:46:48 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
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? Anyway: Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
+ index_re = re.compile(r'([^\[]+)\[([^\]]+)\]')class QMPTestCase(unittest.TestCase):
-- Best regards, Vladimir
[Prev in Thread] | Current Thread | [Next in Thread] |