diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 17:59:46 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-30 13:31:09 +0200 |
commit | 5ad1dbf76a97b6f07d685585175832e990fe9a92 (patch) | |
tree | e7f380126f3c028cac7e9ab25b4e6e2c833a0106 /tests | |
parent | e5ab4347f9f53495e31fcef5e232c7c6be4a0567 (diff) |
qemu-iotests: Add VM.get_qmp_events_filtered()
This adds a helper function that returns a list of QMP events that are
already filtered through filter_qmp_event().
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qemu-iotests/iotests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 28159d837a..17aa7c88dc 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -383,6 +383,11 @@ class VM(qtest.QEMUQtestMachine): output_list += [key + '=' + obj[key]] return ','.join(output_list) + def get_qmp_events_filtered(self, wait=True): + result = [] + for ev in self.get_qmp_events(wait=wait): + result.append(filter_qmp_event(ev)) + return result index_re = re.compile(r'([^\[]+)\[([^\]]+)\]') |