]> git.ipfire.org Git - thirdparty/qemu.git/commit
iotests: add QMP event waiting queue
authorJohn Snow <jsnow@redhat.com>
Fri, 17 Apr 2015 23:50:06 +0000 (19:50 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 30 Jul 2015 02:46:08 +0000 (21:46 -0500)
commitffd060d51fafc1b1e7d8dade06159a10f2e04316
tree30fad23be54c57ed099d7732eb7bbe49fd7a71b9
parente4fb4bea374a74fccbc9e9cf00c24481fb3bc3b5
iotests: add QMP event waiting queue

A filter is added to allow callers to request very specific
events to be pulled from the event queue, while leaving undesired
events still in the stream.

This allows us to poll for completion data for multiple asynchronous
events in any arbitrary order.

A new timeout context is added to the qmp pull_event method's
wait parameter to allow tests to fail if they do not complete
within some expected period of time.

Also fixed is a bug in qmp.pull_event where we try to retrieve an event
from an empty list if we attempt to retrieve an event with wait=False
but no events have occurred.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1429314609-29776-19-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 7898f74e78a5900fc079868e255b65d807fa8a8f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
scripts/qmp/qmp.py
tests/qemu-iotests/iotests.py