From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykxr6-0008Jv-J1 for qemu-devel@nongnu.org; Wed, 22 Apr 2015 12:50:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ykxr1-0002Cx-Ej for qemu-devel@nongnu.org; Wed, 22 Apr 2015 12:50:32 -0400 Message-ID: <5537D14E.3060701@redhat.com> Date: Wed, 22 Apr 2015 18:50:22 +0200 From: Max Reitz MIME-Version: 1.0 References: <1429314609-29776-1-git-send-email-jsnow@redhat.com> <1429314609-29776-19-git-send-email-jsnow@redhat.com> In-Reply-To: <1429314609-29776-19-git-send-email-jsnow@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 18/21] iotests: add QMP event waiting queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-block@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, vsementsov@parallels.com, stefanha@redhat.com On 18.04.2015 01:50, John Snow wrote: > 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 > --- > scripts/qmp/qmp.py | 95 +++++++++++++++++++++++++++++-------------- > tests/qemu-iotests/iotests.py | 38 +++++++++++++++++ > 2 files changed, 103 insertions(+), 30 deletions(-) Reviewed-by: Max Reitz