From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4XnA-00081Q-6D for qemu-devel@nongnu.org; Wed, 09 Nov 2016 13:40:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4Xn9-0004nz-E9 for qemu-devel@nongnu.org; Wed, 09 Nov 2016 13:40:12 -0500 Date: Wed, 9 Nov 2016 13:40:02 -0500 From: Jeff Cody Message-ID: <20161109184002.GH6315@localhost.localdomain> References: <20161109162008.27287-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161109162008.27287-1-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.8] qemu-iotests: avoid spurious failure on test 109 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, jsnow@redhat.com On Wed, Nov 09, 2016 at 05:20:07PM +0100, Paolo Bonzini wrote: > In some cases it is possible that query-io-status is called just > before the job is completed, causing > > -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 31457280, "offset": OFFSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} > -{"return": []} > +{"return": [{"io-status": "ok", "device": "src", "busy": true, "len": 31457280, "offset": OFFSET, "paused": false, "speed": 0, "ready": false, "type": "mirror"}]} > > Assert that the completeion event eventually happens. > > Signed-off-by: Paolo Bonzini > --- > tests/qemu-iotests/109 | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tests/qemu-iotests/109 b/tests/qemu-iotests/109 > index 280ed27..927151a 100755 > --- a/tests/qemu-iotests/109 > +++ b/tests/qemu-iotests/109 > @@ -62,6 +62,9 @@ function run_qemu() > "return" > > _send_qemu_cmd $QEMU_HANDLE '' "$qmp_event" > + if test "$qmp_event" = BLOCK_JOB_ERROR; then > + _send_qemu_cmd $QEMU_HANDLE '' "BLOCK_JOB_COMPLETED" > + fi > _send_qemu_cmd $QEMU_HANDLE '{"execute":"query-block-jobs"}' "return" > _cleanup_qemu > } > -- > 2.9.3 > > Thanks, Applied to my block branch: git://github.com/codyprime/qemu-kvm-jtc.git block -Jeff