diff mbox series

[4/6] iotests: Fix timeout in run_job()

Message ID 20191120140319.1505-5-kwolf@redhat.com
State New
Headers show
Series block: Fix resize (extending) of short overlays | expand

Commit Message

Kevin Wolf Nov. 20, 2019, 2:03 p.m. UTC
run_job() accepts a wait parameter for a timeout, but it doesn't
actually use it. The only thing that is missing is passing it to
events_wait(), so do that now.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/iotests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Blake Nov. 20, 2019, 2:29 p.m. UTC | #1
On 11/20/19 8:03 AM, Kevin Wolf wrote:
> run_job() accepts a wait parameter for a timeout, but it doesn't
> actually use it. The only thing that is missing is passing it to
> events_wait(), so do that now.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>   tests/qemu-iotests/iotests.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
> index 330681ad02..b409198e47 100644
> --- a/tests/qemu-iotests/iotests.py
> +++ b/tests/qemu-iotests/iotests.py
> @@ -604,7 +604,7 @@ class VM(qtest.QEMUQtestMachine):
>           ]
>           error = None
>           while True:
> -            ev = filter_qmp_event(self.events_wait(events))
> +            ev = filter_qmp_event(self.events_wait(events, timeout=wait))
>               if ev['event'] != 'JOB_STATUS_CHANGE':
>                   if use_log:
>                       log(ev)
>
Vladimir Sementsov-Ogievskiy Nov. 20, 2019, 2:51 p.m. UTC | #2
20.11.2019 17:03, Kevin Wolf wrote:
> run_job() accepts a wait parameter for a timeout, but it doesn't
> actually use it. The only thing that is missing is passing it to
> events_wait(), so do that now.
> 
> Signed-off-by: Kevin Wolf<kwolf@redhat.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
diff mbox series

Patch

diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 330681ad02..b409198e47 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -604,7 +604,7 @@  class VM(qtest.QEMUQtestMachine):
         ]
         error = None
         while True:
-            ev = filter_qmp_event(self.events_wait(events))
+            ev = filter_qmp_event(self.events_wait(events, timeout=wait))
             if ev['event'] != 'JOB_STATUS_CHANGE':
                 if use_log:
                     log(ev)