cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
902636
From a3778aef0be61dead835af39073a62bbf72c8e20 Mon Sep 17 00:00:00 2001
902636
From: Kevin Wolf <kwolf@redhat.com>
902636
Date: Fri, 7 Feb 2020 11:23:59 +0000
902636
Subject: [PATCH 02/18] iotests: Support job-complete in run_job()
902636
902636
RH-Author: Kevin Wolf <kwolf@redhat.com>
902636
Message-id: <20200207112404.25198-2-kwolf@redhat.com>
902636
Patchwork-id: 93746
902636
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v2 1/6] iotests: Support job-complete in run_job()
902636
Bugzilla: 1781637
902636
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
902636
RH-Acked-by: Max Reitz <mreitz@redhat.com>
902636
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
902636
902636
Automatically complete jobs that have a 'ready' state and need an
902636
explicit job-complete. Without this, run_job() would hang for such
902636
jobs.
902636
902636
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
902636
Reviewed-by: Eric Blake <eblake@redhat.com>
902636
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
902636
Reviewed-by: Alberto Garcia <berto@igalia.com>
902636
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
902636
(cherry picked from commit 4688c4e32ec76004676470f11734478799673d6d)
902636
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
902636
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
902636
---
902636
 tests/qemu-iotests/iotests.py | 2 ++
902636
 1 file changed, 2 insertions(+)
902636
902636
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
902636
index df07089..3cff671 100644
902636
--- a/tests/qemu-iotests/iotests.py
902636
+++ b/tests/qemu-iotests/iotests.py
902636
@@ -617,6 +617,8 @@ class VM(qtest.QEMUQtestMachine):
902636
                         error = j['error']
902636
                         if use_log:
902636
                             log('Job failed: %s' % (j['error']))
902636
+            elif status == 'ready':
902636
+                self.qmp_log('job-complete', id=job)
902636
             elif status == 'pending' and not auto_finalize:
902636
                 if pre_finalize:
902636
                     pre_finalize()
902636
-- 
902636
1.8.3.1
902636