• John Snow's avatar
    iotests: add QMP event waiting queue · 7898f74e
    John Snow authored
    
    
    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: default avatarJohn Snow <jsnow@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Message-id: 1429314609-29776-19-git-send-email-jsnow@redhat.com
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    7898f74e