|
|
26ba25 |
From c491cc3ca87111382c337eda74a1d7cf74891df0 Mon Sep 17 00:00:00 2001
|
|
|
26ba25 |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
26ba25 |
Date: Tue, 26 Jun 2018 09:48:41 +0200
|
|
|
26ba25 |
Subject: [PATCH 133/268] qemu-iotests: Add VM.get_qmp_events_filtered()
|
|
|
26ba25 |
|
|
|
26ba25 |
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
|
26ba25 |
Message-id: <20180626094856.6924-59-kwolf@redhat.com>
|
|
|
26ba25 |
Patchwork-id: 81122
|
|
|
26ba25 |
O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH v2 58/73] qemu-iotests: Add VM.get_qmp_events_filtered()
|
|
|
26ba25 |
Bugzilla: 1513543
|
|
|
26ba25 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
26ba25 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
26ba25 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
26ba25 |
|
|
|
26ba25 |
This adds a helper function that returns a list of QMP events that are
|
|
|
26ba25 |
already filtered through filter_qmp_event().
|
|
|
26ba25 |
|
|
|
26ba25 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
26ba25 |
Reviewed-by: Max Reitz <mreitz@redhat.com>
|
|
|
26ba25 |
Reviewed-by: Jeff Cody <jcody@redhat.com>
|
|
|
26ba25 |
(cherry picked from commit 5ad1dbf76a97b6f07d685585175832e990fe9a92)
|
|
|
26ba25 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
26ba25 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
26ba25 |
---
|
|
|
26ba25 |
tests/qemu-iotests/iotests.py | 5 +++++
|
|
|
26ba25 |
1 file changed, 5 insertions(+)
|
|
|
26ba25 |
|
|
|
26ba25 |
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
|
|
|
26ba25 |
index d190ce7..8c08d05 100644
|
|
|
26ba25 |
--- a/tests/qemu-iotests/iotests.py
|
|
|
26ba25 |
+++ b/tests/qemu-iotests/iotests.py
|
|
|
26ba25 |
@@ -393,6 +393,11 @@ class VM(qtest.QEMUQtestMachine):
|
|
|
26ba25 |
output_list += [key + '=' + obj[key]]
|
|
|
26ba25 |
return ','.join(output_list)
|
|
|
26ba25 |
|
|
|
26ba25 |
+ def get_qmp_events_filtered(self, wait=True):
|
|
|
26ba25 |
+ result = []
|
|
|
26ba25 |
+ for ev in self.get_qmp_events(wait=wait):
|
|
|
26ba25 |
+ result.append(filter_qmp_event(ev))
|
|
|
26ba25 |
+ return result
|
|
|
26ba25 |
|
|
|
26ba25 |
|
|
|
26ba25 |
index_re = re.compile(r'([^\[]+)\[([^\]]+)\]')
|
|
|
26ba25 |
--
|
|
|
26ba25 |
1.8.3.1
|
|
|
26ba25 |
|