yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
ddf19c
From bb7b968a02c97564596b73d8d080cd745d96ed6b Mon Sep 17 00:00:00 2001
ddf19c
From: Kevin Wolf <kwolf@redhat.com>
ddf19c
Date: Fri, 13 Mar 2020 12:34:35 +0000
ddf19c
Subject: [PATCH 15/20] iotests: Fix run_job() with use_log=False
ddf19c
ddf19c
RH-Author: Kevin Wolf <kwolf@redhat.com>
ddf19c
Message-id: <20200313123439.10548-10-kwolf@redhat.com>
ddf19c
Patchwork-id: 94284
ddf19c
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v2 09/13] iotests: Fix run_job() with use_log=False
ddf19c
Bugzilla: 1790482 1805143
ddf19c
RH-Acked-by: John Snow <jsnow@redhat.com>
ddf19c
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
ddf19c
RH-Acked-by: Peter Krempa <pkrempa@redhat.com>
ddf19c
ddf19c
The 'job-complete' QMP command should be run with qmp() rather than
ddf19c
qmp_log() if use_log=False is passed.
ddf19c
ddf19c
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ddf19c
Message-Id: <20200310113831.27293-4-kwolf@redhat.com>
ddf19c
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
ddf19c
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ddf19c
(cherry picked from commit b31b532122ec6f68d17168449c034d2197bf96ec)
ddf19c
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ddf19c
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ddf19c
---
ddf19c
 tests/qemu-iotests/iotests.py | 5 ++++-
ddf19c
 1 file changed, 4 insertions(+), 1 deletion(-)
ddf19c
ddf19c
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
ddf19c
index 0c55f7b..46f880c 100644
ddf19c
--- a/tests/qemu-iotests/iotests.py
ddf19c
+++ b/tests/qemu-iotests/iotests.py
ddf19c
@@ -618,7 +618,10 @@ class VM(qtest.QEMUQtestMachine):
ddf19c
                         if use_log:
ddf19c
                             log('Job failed: %s' % (j['error']))
ddf19c
             elif status == 'ready':
ddf19c
-                self.qmp_log('job-complete', id=job)
ddf19c
+                if use_log:
ddf19c
+                    self.qmp_log('job-complete', id=job)
ddf19c
+                else:
ddf19c
+                    self.qmp('job-complete', id=job)
ddf19c
             elif status == 'pending' and not auto_finalize:
ddf19c
                 if pre_finalize:
ddf19c
                     pre_finalize()
ddf19c
-- 
ddf19c
1.8.3.1
ddf19c