Message ID | 20180529203910.7615-6-kwolf@redhat.com |
---|---|
State | New |
Headers | show |
Series | block: Make blockdev-create a job and stable API | expand |
On Tue, May 29, 2018 at 10:38:59PM +0200, Kevin Wolf wrote: > 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> > --- > tests/qemu-iotests/iotests.py | 5 +++++ > 1 file changed, 5 insertions(+) > > 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'([^\[]+)\[([^\]]+)\]') > -- > 2.13.6 >
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'([^\[]+)\[([^\]]+)\]')