From nobody Thu Apr 25 11:14:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560381236; cv=none; d=zoho.com; s=zohoarc; b=EKGT2d92x2mBz6713/VyT3fqTky4IlvmyRR819U7YYK/WozSsRLPl5HfZ0QXv3wArIPMueyW+bWk5K67vuBHKSdMphR37e16vT3QQBVwj7oqeAdT+vj4oE3Inef02NQ6cwe6hOIiOV/w8jF2ir2cmZBDwrY/RFP6xjLj1XUIGJ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560381236; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=Y9HcOr+XpHEnBFIFaPNpQ2uqy7+NaBgsU6RdMQF7+qU=; b=ALPtzDJbayCZWybhcL6sCKeYXK7Z4P/rsaxQGtNzwZpmv/x98FxePwhnRfm6/Za1HNadF8OXC5zi9lAqHhQ2FdCH4jGpqOdZzIpNW8m4dCHvJiJHf2H4KAXJStgaaCBoiYz/n3O+Q3ePIMsYZAxEynQFRtBfVN9brl7UhjI93Ik= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560381236398551.8431750541303; Wed, 12 Jun 2019 16:13:56 -0700 (PDT) Received: from localhost ([::1]:35962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbCR9-0000Gj-LM for importer@patchew.org; Wed, 12 Jun 2019 19:13:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52513) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbBrv-0005pI-4W for qemu-devel@nongnu.org; Wed, 12 Jun 2019 18:37:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbBrt-0005xF-IV for qemu-devel@nongnu.org; Wed, 12 Jun 2019 18:37:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52366) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbBrq-0005n5-JO; Wed, 12 Jun 2019 18:37:18 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 000F1307D869; Wed, 12 Jun 2019 22:37:03 +0000 (UTC) Received: from localhost (unknown [10.40.205.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 861645ED2B; Wed, 12 Jun 2019 22:37:03 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Thu, 13 Jun 2019 00:37:01 +0200 Message-Id: <20190612223701.31456-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 12 Jun 2019 22:37:04 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] iotests: Fix 129 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Throttling on the BB have not affected block jobs in a while, so 129 is prone to break (at least on tmpfs with high system load). We can fix the problem by running the job from a throttle node. Signed-off-by: Max Reitz --- Depends on "[PATCH v5 00/42] block: Deal with filters". Based-on: <20190612221004.2317-1-mreitz@redhat.com> Yes, I know, that is a long dependency chain. For now, I just want to show that this patch exists. --- tests/qemu-iotests/129 | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 9e87e1c8d9..c729e2bde5 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -31,52 +31,37 @@ class TestStopWithBlockJob(iotests.QMPTestCase): iotests.qemu_img('create', '-f', iotests.imgfmt, self.base_img, "1= G") iotests.qemu_img('create', '-f', iotests.imgfmt, self.test_img, "-= b", self.base_img) iotests.qemu_io('-f', iotests.imgfmt, '-c', 'write -P0x5d 1M 128M'= , self.test_img) - self.vm =3D iotests.VM().add_drive(self.test_img) + self.vm =3D iotests.VM() + self.vm.add_object('throttle-group,id=3Dtg0,x-bps-total=3D1024') + self.vm.add_drive(None, 'driver=3Dthrottle,throttle-group=3Dtg0,fi= le.driver=3D%s,file.file.filename=3D%s' % (iotests.imgfmt, self.test_img)) self.vm.launch() =20 def tearDown(self): - params =3D {"device": "drive0", - "bps": 0, - "bps_rd": 0, - "bps_wr": 0, - "iops": 0, - "iops_rd": 0, - "iops_wr": 0, - } - result =3D self.vm.qmp("block_set_io_throttle", conv_keys=3DFalse, - **params) self.vm.shutdown() =20 def do_test_stop(self, cmd, **args): """Test 'stop' while block job is running on a throttled drive. The 'stop' command shouldn't drain the job""" - params =3D {"device": "drive0", - "bps": 1024, - "bps_rd": 0, - "bps_wr": 0, - "iops": 0, - "iops_rd": 0, - "iops_wr": 0, - } - result =3D self.vm.qmp("block_set_io_throttle", conv_keys=3DFalse, - **params) - self.assert_qmp(result, 'return', {}) result =3D self.vm.qmp(cmd, **args) self.assert_qmp(result, 'return', {}) + result =3D self.vm.qmp("stop") self.assert_qmp(result, 'return', {}) result =3D self.vm.qmp("query-block-jobs") + self.assert_qmp(result, 'return[0]/busy', True) self.assert_qmp(result, 'return[0]/ready', False) =20 + self.vm.qmp("block-job-cancel", device=3D"drive0", force=3DTrue) + def test_drive_mirror(self): self.do_test_stop("drive-mirror", device=3D"drive0", - target=3Dself.target_img, + target=3Dself.target_img, format=3Diotests.imgfm= t, sync=3D"full") =20 def test_drive_backup(self): self.do_test_stop("drive-backup", device=3D"drive0", - target=3Dself.target_img, + target=3Dself.target_img, format=3Diotests.imgfm= t, sync=3D"full") =20 def test_block_commit(self): --=20 2.21.0