OSDN Git Service

iotests: Fix timeout in run_job()
authorKevin Wolf <kwolf@redhat.com>
Tue, 19 Nov 2019 17:37:06 +0000 (18:37 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 18 Dec 2019 10:21:16 +0000 (11:21 +0100)
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: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/qemu-iotests/iotests.py

index fc78852..0ac3ad4 100644 (file)
@@ -609,7 +609,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)