From nobody Sun May 5 05:18:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487282489551989.2064226468821; Thu, 16 Feb 2017 14:01:29 -0800 (PST) Received: from localhost ([::1]:50498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceU7E-0000il-8r for importer@patchew.org; Thu, 16 Feb 2017 17:01:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceU5w-0008QB-0D for qemu-devel@nongnu.org; Thu, 16 Feb 2017 17:00:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceU5v-00015o-DY for qemu-devel@nongnu.org; Thu, 16 Feb 2017 17:00:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47108) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ceU5q-00010q-UE; Thu, 16 Feb 2017 17:00:03 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DBAD94E339; Thu, 16 Feb 2017 22:00:02 +0000 (UTC) Received: from scv.usersys.redhat.com (dhcp-17-221.bos.redhat.com [10.18.17.221]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1GM01a8019794; Thu, 16 Feb 2017 17:00:02 -0500 From: John Snow To: qemu-block@nongnu.org Date: Thu, 16 Feb 2017 17:00:00 -0500 Message-Id: <20170216220000.1004-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 16 Feb 2017 22:00:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] iotests: Fix another race in 030 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , qemu-devel@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We can't rely on a non-paused job to be present and running for us. Assume that if the job is not present that it completed already. Signed-off-by: John Snow Reviewed-by: Fam Zheng --- tests/qemu-iotests/030 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index 54db54a..0d472d5 100755 --- a/tests/qemu-iotests/030 +++ b/tests/qemu-iotests/030 @@ -547,11 +547,14 @@ class TestEIO(TestErrors): while not completed: for event in self.vm.get_qmp_events(wait=3DTrue): if event['event'] =3D=3D 'BLOCK_JOB_ERROR': + error =3D True self.assert_qmp(event, 'data/device', 'drive0') self.assert_qmp(event, 'data/operation', 'read') result =3D self.vm.qmp('query-block-jobs') + if result =3D=3D {'return': []}: + # Job finished too quickly + continue self.assert_qmp(result, 'return[0]/paused', False) - error =3D True elif event['event'] =3D=3D 'BLOCK_JOB_COMPLETED': self.assertTrue(error, 'job completed unexpectedly') self.assert_qmp(event, 'data/type', 'stream') --=20 2.9.3