From nobody Fri Nov 7 21:04:36 2025 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548862161658856.6128504374121; Wed, 30 Jan 2019 07:29:21 -0800 (PST) Received: from localhost ([127.0.0.1]:39828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gornk-0001Iy-37 for importer@patchew.org; Wed, 30 Jan 2019 10:29:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gorjT-0006Kc-2H for qemu-devel@nongnu.org; Wed, 30 Jan 2019 10:24:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gorjS-0005Di-Fi for qemu-devel@nongnu.org; Wed, 30 Jan 2019 10:24:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58122) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gorjQ-0005D7-K5; Wed, 30 Jan 2019 10:24:52 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DED07368E6; Wed, 30 Jan 2019 15:24:51 +0000 (UTC) Received: from localhost (unknown [10.40.205.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D88385C21A; Wed, 30 Jan 2019 15:24:47 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Wed, 30 Jan 2019 16:24:26 +0100 Message-Id: <20190130152434.17283-3-mreitz@redhat.com> In-Reply-To: <20190130152434.17283-1-mreitz@redhat.com> References: <20190130152434.17283-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 30 Jan 2019 15:24:51 +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 v2 02/10] iotests: Fix 237 for Python 2.x 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: Kevin Wolf , John Snow , 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" math.ceil() returns an integer on Python 3.x, but a float on Python 2.x. range() always needs integers, so we need an explicit conversion on 2.x (which does not hurt on 3.x). It is not quite clear whether we want to support Python 2.x for any prolonged time, but this may as well be fixed along with the other issues some iotests have right now. Signed-off-by: Max Reitz Reviewed-by: John Snow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/qemu-iotests/237 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/237 b/tests/qemu-iotests/237 index fe0dd0f461..06897f8c87 100755 --- a/tests/qemu-iotests/237 +++ b/tests/qemu-iotests/237 @@ -224,7 +224,7 @@ with iotests.FilePath('t.vmdk') as disk_path, \ iotests.log("=3D %s %d =3D" % (subfmt, size)) iotests.log("") =20 - num_extents =3D math.ceil(size / 2.0**31) + num_extents =3D int(math.ceil(size / 2.0**31)) extents =3D [ "ext%d" % (i) for i in range(1, num_extents + 1)= ] =20 vm.launch() --=20 2.20.1