From nobody Fri May 17 05:50:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1620841901; cv=none; d=zohomail.com; s=zohoarc; b=ROwvUH+N/+UKrJMvx5idjuZDADFj+A9JqgRdtQCe4AsDzuPrpOpLs7HMbSJPIuCOOKmH7AEM8ohPExNldEiQfc55OroK3Bs6LYYACjykg1lyS4LA7d9KJrSnVFFmcg4FIgLIg1xCuTDGI1X1I7Fmmj1YC0fOe6VkrLfLQdCpK6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620841901; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TBBhCa9kpR+FjWdHhTQB8NP3iSw5WyqZmTaKDGsqKHo=; b=M06F09a4WIx5UMSCnYCbRguQARMzjKkO3+NcWxxtG1yLT3lgaAWQt4SHFy/NxJkh2m/4dugpjGgjhhch+rEoKnHpUAQzr1lKAJ/0ccsgzHxhBBT3BgF+kNOODMwDAhqa9LqU+3QbbYInF9m5OgRlEaru+krpu/901Htettbf2lE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1620841901864352.7045777842037; Wed, 12 May 2021 10:51:41 -0700 (PDT) Received: from localhost ([::1]:58464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgt1I-0001O9-Vl for importer@patchew.org; Wed, 12 May 2021 13:51:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgstP-00034W-VQ for qemu-devel@nongnu.org; Wed, 12 May 2021 13:43:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52255) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgstN-0006dV-MQ for qemu-devel@nongnu.org; Wed, 12 May 2021 13:43:31 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-312-3MKRk9UMOU6nV8c-YnYhsg-1; Wed, 12 May 2021 13:43:25 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id C405D1B18BC1; Wed, 12 May 2021 17:43:24 +0000 (UTC) Received: from localhost (ovpn-114-121.ams2.redhat.com [10.36.114.121]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6D7852CE3A; Wed, 12 May 2021 17:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620841409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TBBhCa9kpR+FjWdHhTQB8NP3iSw5WyqZmTaKDGsqKHo=; b=CbYS4g5NJmtwLMhZJ17nzhMyQNxuyPJwfg6xq6rmMzzP5IPz+2eGpXdQ9++IL8HtJjDsE6 jfYEF23sDWoBg2Ea7brc+Xla1cTk2R1IoBrVHbCceemXN8E+smWhKnZqPYyf7fwfqQ/fir VhyaqR2Ef2JlidcGfSGCXP8DMlaI/Ew= X-MC-Unique: 3MKRk9UMOU6nV8c-YnYhsg-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 1/4] iotests/297: Drop 169 and 199 from the skip list Date: Wed, 12 May 2021 19:43:15 +0200 Message-Id: <20210512174318.59466-2-mreitz@redhat.com> In-Reply-To: <20210512174318.59466-1-mreitz@redhat.com> References: <20210512174318.59466-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 169 and 199 have been renamed and moved to tests/ (commit a44be0334be: "iotests: rename and move 169 and 199 tests"), so we can drop them from the skip list. Signed-off-by: Max Reitz Reviewed-by: Willian Rampazzo Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- tests/qemu-iotests/297 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index a37910b42d..e3244d40a0 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -29,7 +29,7 @@ import iotests SKIP_FILES =3D ( '030', '040', '041', '044', '045', '055', '056', '057', '065', '093', '096', '118', '124', '132', '136', '139', '147', '148', '149', - '151', '152', '155', '163', '165', '169', '194', '196', '199', '202', + '151', '152', '155', '163', '165', '194', '196', '202', '203', '205', '206', '207', '208', '210', '211', '212', '213', '216', '218', '219', '222', '224', '228', '234', '235', '236', '237', '238', '240', '242', '245', '246', '248', '255', '256', '257', '258', '260', --=20 2.31.1 From nobody Fri May 17 05:50:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1620841798; cv=none; d=zohomail.com; s=zohoarc; b=PRYKV9j2cSr05Czpx7wMPIRY55rSaW8QSYoguQa1kHYQPDx4QoaIS6WOXV/abnOikA9QSMu5+i0mzX/7p9OBR5REcnB6J/RPil3fOCGNhkDIqEly9uj/2eN79v60/Bb3Gh9Qtq5MYDdv5DSKxdFMThbvz0ywnDNMS9aaSw688YI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620841798; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TtO597vWL3YjT0lF8Xi4dX61e0R3nBj7SxsdKv7Vbpw=; b=cVLTokAFErDIOZb7fKa4rbf9wPj508uTBdBfQiP0Ygcx26OBYCUW9HIPJpuMG1FHe8NCafzx5/ebBPs5pevqqE4YLE8hBRX2SyKLg2/up+/SK/UI4k7qobDa/ffSg0nNLiZ1oEcWf4J/5ARXFv3JKfwrqB8IkKX6rbBERgtonl4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1620841798630989.311553042504; Wed, 12 May 2021 10:49:58 -0700 (PDT) Received: from localhost ([::1]:53514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgszd-0006Tl-SP for importer@patchew.org; Wed, 12 May 2021 13:49:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgstR-0003A6-7G for qemu-devel@nongnu.org; Wed, 12 May 2021 13:43:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:48405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgstP-0006fh-0I for qemu-devel@nongnu.org; Wed, 12 May 2021 13:43:32 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-256-_ph91t1AM4SwDUYqRs7k_A-1; Wed, 12 May 2021 13:43:27 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id E90BB1B18BC1; Wed, 12 May 2021 17:43:26 +0000 (UTC) Received: from localhost (ovpn-114-121.ams2.redhat.com [10.36.114.121]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D7685D9C0; Wed, 12 May 2021 17:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620841410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TtO597vWL3YjT0lF8Xi4dX61e0R3nBj7SxsdKv7Vbpw=; b=E0BthABXrLlo33B5DyvPUEebN5I86YTbZ20NP+kqKqLSPK85/C+8cD5VtT8a9H6qkQpEmW tlHkYLEy3ryV+0j3wxVWzEZvwbufxY3w0ErKTbIesyLpTm6MWFJxhw3F5FlTaMfg7xL1GB CroTV9/G2rgykAiX1AcDjLDAoB7bu2Q= X-MC-Unique: _ph91t1AM4SwDUYqRs7k_A-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 2/4] migrate-bitmaps-postcopy-test: Fix pylint warnings Date: Wed, 12 May 2021 19:43:16 +0200 Message-Id: <20210512174318.59466-3-mreitz@redhat.com> In-Reply-To: <20210512174318.59466-1-mreitz@redhat.com> References: <20210512174318.59466-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" pylint complains that discards1_sha256 and all_discards_sha256 are first set in non-__init__ methods. These variables are not really class-variables anyway, so let them instead be returned by start_postcopy(), thus silencing pylint. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- .../tests/migrate-bitmaps-postcopy-test | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test b/tests= /qemu-iotests/tests/migrate-bitmaps-postcopy-test index 584062b412..00ebb5c251 100755 --- a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test +++ b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test @@ -132,10 +132,10 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTes= tCase): =20 result =3D self.vm_a.qmp('x-debug-block-dirty-bitmap-sha256', node=3D'drive0', name=3D'bitmap0') - self.discards1_sha256 =3D result['return']['sha256'] + discards1_sha256 =3D result['return']['sha256'] =20 # Check, that updating the bitmap by discards works - assert self.discards1_sha256 !=3D empty_sha256 + assert discards1_sha256 !=3D empty_sha256 =20 # We want to calculate resulting sha256. Do it in bitmap0, so, dis= able # other bitmaps @@ -148,7 +148,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestC= ase): =20 result =3D self.vm_a.qmp('x-debug-block-dirty-bitmap-sha256', node=3D'drive0', name=3D'bitmap0') - self.all_discards_sha256 =3D result['return']['sha256'] + all_discards_sha256 =3D result['return']['sha256'] =20 # Now, enable some bitmaps, to be updated during migration for i in range(2, nb_bitmaps, 2): @@ -173,10 +173,11 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTes= tCase): =20 event_resume =3D self.vm_b.event_wait('RESUME') self.vm_b_events.append(event_resume) - return event_resume + return (event_resume, discards1_sha256, all_discards_sha256) =20 def test_postcopy_success(self): - event_resume =3D self.start_postcopy() + event_resume, discards1_sha256, all_discards_sha256 =3D \ + self.start_postcopy() =20 # enabled bitmaps should be updated apply_discards(self.vm_b, discards2) @@ -217,7 +218,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestC= ase): for i in range(0, nb_bitmaps, 5): result =3D self.vm_b.qmp('x-debug-block-dirty-bitmap-sha256', node=3D'drive0', name=3D'bitmap{}'.form= at(i)) - sha =3D self.discards1_sha256 if i % 2 else self.all_discards_= sha256 + sha =3D discards1_sha256 if i % 2 else all_discards_sha256 self.assert_qmp(result, 'return/sha256', sha) =20 def test_early_shutdown_destination(self): --=20 2.31.1 From nobody Fri May 17 05:50:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1620841728; cv=none; d=zohomail.com; s=zohoarc; b=hV0EM5z+swFnI7VOS2cTEDLfUldIsFquuWQbZ/H2o2J9Gqsr+mwYKJUbXyr517pCjfTqJvRaAqNlXu1DcRR8BT7CzqCIm2Rxp1Wb244l2izJWOdJusC7+H6oPULU4A9RbngajB2O0XLglakVexKhHJtESDLKk1PkoOdKpvkX50I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620841728; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pnCANIv1VAUtEoiQvpSyTaa8eEKpQkSIXTqJkRiDsI4=; b=DOhDKXZvFuXkJcAe5/1NRqvVISrQnTf+9olkGB0ptj0c6clRoVolJtSJZTKl0p5v6d+AUmTqVuBkIqMagCNM3bem8r7M8QR7aYvVz9tWspJuGSi2obLlhCNEAF8Dn9VV/LsdTvA4ONngG2+LwVT1+i25FKv3TiGDp+SpjHnZOHI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1620841728005473.91608292609726; Wed, 12 May 2021 10:48:48 -0700 (PDT) Received: from localhost ([::1]:49472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgsyU-0003lO-Uh for importer@patchew.org; Wed, 12 May 2021 13:48:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgstT-0003I9-5X for qemu-devel@nongnu.org; Wed, 12 May 2021 13:43:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgstQ-0006hH-AK for qemu-devel@nongnu.org; Wed, 12 May 2021 13:43:34 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-510-ZaZI8dAYO1Kz4LotuaGKOg-1; Wed, 12 May 2021 13:43:29 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id EFCAB107ACCD; Wed, 12 May 2021 17:43:28 +0000 (UTC) Received: from localhost (ovpn-114-121.ams2.redhat.com [10.36.114.121]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96B175C8AA; Wed, 12 May 2021 17:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620841411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pnCANIv1VAUtEoiQvpSyTaa8eEKpQkSIXTqJkRiDsI4=; b=UMWSsTpZ76f8hrRv5YG+nj6lxH5uiJvwaQ7yxMSTE/yPuvwv5bhD79JK/+uPLBS8NbXyCL 8DPGnaWRAVanQUuH50Li+TOnr6VG3uSUERyipH2mVKmswW5jRVfMOBKlUmMTDY13Ps9KaQ 38XrMKnspAkVGtJp1ZNFKgxfueYo0ls= X-MC-Unique: ZaZI8dAYO1Kz4LotuaGKOg-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 3/4] migrate-bitmaps-test: Fix pylint warnings Date: Wed, 12 May 2021 19:43:17 +0200 Message-Id: <20210512174318.59466-4-mreitz@redhat.com> In-Reply-To: <20210512174318.59466-1-mreitz@redhat.com> References: <20210512174318.59466-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" There are a couple of things pylint takes issue with: - The "time" import is unused - The import order (iotests should come last) - get_bitmap_hash() doesn't use @self and so should be a function - Semicolons at the end of some lines - Parentheses after "if" - Some lines are too long (80 characters instead of 79) - inject_test_case()'s @name parameter shadows a top-level @name variable - "lambda self: mc(self)" is equivalent to just "mc" - Always put two empty lines after a function - f'exec: cat > /dev/null' does not need to be an f-string Fix them. Signed-off-by: Max Reitz Reviewed-by: Willian Rampazzo Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- tests/qemu-iotests/tests/migrate-bitmaps-test | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-test b/tests/qemu-iot= ests/tests/migrate-bitmaps-test index a5c7bc83e0..fb5ffbb8c4 100755 --- a/tests/qemu-iotests/tests/migrate-bitmaps-test +++ b/tests/qemu-iotests/tests/migrate-bitmaps-test @@ -20,11 +20,10 @@ # =20 import os -import iotests -import time import itertools import operator import re +import iotests from iotests import qemu_img, qemu_img_create, Timeout =20 =20 @@ -37,6 +36,12 @@ mig_cmd =3D 'exec: cat > ' + mig_file incoming_cmd =3D 'exec: cat ' + mig_file =20 =20 +def get_bitmap_hash(vm): + result =3D vm.qmp('x-debug-block-dirty-bitmap-sha256', + node=3D'drive0', name=3D'bitmap0') + return result['return']['sha256'] + + class TestDirtyBitmapMigration(iotests.QMPTestCase): def tearDown(self): self.vm_a.shutdown() @@ -62,21 +67,16 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): params['persistent'] =3D True =20 result =3D vm.qmp('block-dirty-bitmap-add', **params) - self.assert_qmp(result, 'return', {}); - - def get_bitmap_hash(self, vm): - result =3D vm.qmp('x-debug-block-dirty-bitmap-sha256', - node=3D'drive0', name=3D'bitmap0') - return result['return']['sha256'] + self.assert_qmp(result, 'return', {}) =20 def check_bitmap(self, vm, sha256): result =3D vm.qmp('x-debug-block-dirty-bitmap-sha256', node=3D'drive0', name=3D'bitmap0') if sha256: - self.assert_qmp(result, 'return/sha256', sha256); + self.assert_qmp(result, 'return/sha256', sha256) else: self.assert_qmp(result, 'error/desc', - "Dirty bitmap 'bitmap0' not found"); + "Dirty bitmap 'bitmap0' not found") =20 def do_test_migration_resume_source(self, persistent, migrate_bitmaps): granularity =3D 512 @@ -97,7 +97,7 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): self.add_bitmap(self.vm_a, granularity, persistent) for r in regions: self.vm_a.hmp_qemu_io('drive0', 'write %d %d' % r) - sha256 =3D self.get_bitmap_hash(self.vm_a) + sha256 =3D get_bitmap_hash(self.vm_a) =20 result =3D self.vm_a.qmp('migrate', uri=3Dmig_cmd) while True: @@ -106,7 +106,7 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): break while True: result =3D self.vm_a.qmp('query-status') - if (result['return']['status'] =3D=3D 'postmigrate'): + if result['return']['status'] =3D=3D 'postmigrate': break =20 # test that bitmap is still here @@ -164,7 +164,7 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): self.add_bitmap(self.vm_a, granularity, persistent) for r in regions: self.vm_a.hmp_qemu_io('drive0', 'write %d %d' % r) - sha256 =3D self.get_bitmap_hash(self.vm_a) + sha256 =3D get_bitmap_hash(self.vm_a) =20 if pre_shutdown: self.vm_a.shutdown() @@ -214,16 +214,17 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): self.check_bitmap(self.vm_b, sha256 if persistent else False) =20 =20 -def inject_test_case(klass, name, method, *args, **kwargs): +def inject_test_case(klass, suffix, method, *args, **kwargs): mc =3D operator.methodcaller(method, *args, **kwargs) - setattr(klass, 'test_' + method + name, lambda self: mc(self)) + setattr(klass, 'test_' + method + suffix, mc) + =20 for cmb in list(itertools.product((True, False), repeat=3D5)): name =3D ('_' if cmb[0] else '_not_') + 'persistent_' name +=3D ('_' if cmb[1] else '_not_') + 'migbitmap_' name +=3D '_online' if cmb[2] else '_offline' name +=3D '_shared' if cmb[3] else '_nonshared' - if (cmb[4]): + if cmb[4]: name +=3D '__pre_shutdown' =20 inject_test_case(TestDirtyBitmapMigration, name, 'do_test_migration', @@ -270,7 +271,8 @@ class TestDirtyBitmapBackingMigration(iotests.QMPTestCa= se): self.assert_qmp(result, 'return', {}) =20 # Check that the bitmaps are there - for node in self.vm.qmp('query-named-block-nodes', flat=3DTrue)['r= eturn']: + nodes =3D self.vm.qmp('query-named-block-nodes', flat=3DTrue)['ret= urn'] + for node in nodes: if 'node0' in node['node-name']: self.assert_qmp(node, 'dirty-bitmaps[0]/name', 'bmap0') =20 @@ -287,7 +289,7 @@ class TestDirtyBitmapBackingMigration(iotests.QMPTestCa= se): """ Continue the source after migration. """ - result =3D self.vm.qmp('migrate', uri=3Df'exec: cat > /dev/null') + result =3D self.vm.qmp('migrate', uri=3D'exec: cat > /dev/null') self.assert_qmp(result, 'return', {}) =20 with Timeout(10, 'Migration timeout'): --=20 2.31.1 From nobody Fri May 17 05:50:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1620841852; cv=none; d=zohomail.com; s=zohoarc; b=JZJ6LS+Nnlfwl3D6grYFSvcxzzxTBDYnQw5dn4NrnoKP8xkSRaXNE13da5bPwOyfvV3fETOnQFHORnxEVXB0f+EftyXosR+4CpEVYGtW6Yd6YUSPRpzrbbNxdL1Vo+F0i0TC5ZofTuqqkXG3mwJlEGPt+6rIwFaz7y3lCGRunUY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620841852; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=R86zZcc7FRpHnU0QoCyv8eJWQ5iCxrcTg+rbTtfI/LE=; b=bbtp7OtegxTa4LyeGjk6nxuqOQPFO3KNhXCpvbF8rEXPHGksRi5BdTRQLZNp7TvAW+ZNq9XsEH69mlRgFxjQGRgkt2UGigqmnhUBJhV3aLTttoA+eiwvlAm2i8RS3nniYmBtAf9mVOByrDNTVbCQh9dHez7Ryh5LWAN4kfBh+QQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16208418528305.412187680967236; Wed, 12 May 2021 10:50:52 -0700 (PDT) Received: from localhost ([::1]:56284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgt0W-0008LB-3r for importer@patchew.org; Wed, 12 May 2021 13:50:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgstT-0003Lm-WF for qemu-devel@nongnu.org; Wed, 12 May 2021 13:43:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgstS-0006jm-EO for qemu-devel@nongnu.org; Wed, 12 May 2021 13:43:35 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-600-Pry91UY8PlCA_NmJYqYfZw-1; Wed, 12 May 2021 13:43:31 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC92C101371D; Wed, 12 May 2021 17:43:30 +0000 (UTC) Received: from localhost (ovpn-114-121.ams2.redhat.com [10.36.114.121]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98F7260CC6; Wed, 12 May 2021 17:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620841413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R86zZcc7FRpHnU0QoCyv8eJWQ5iCxrcTg+rbTtfI/LE=; b=X7yfWqqznC1WyWRfr/nESh5rTiWKBV6HwHmo/b84jukPgm74nfAvBywwGDuDeilPV5ofMj Y2uTr87EOrZEg4fhvaTjE+24iLTP1bFQRCkgtVfvwIeGalGQDSvnZwhzVejMa/urmL1UAF LRQuKdR8NHHhnXozMoHEyfg4CTshiY8= X-MC-Unique: Pry91UY8PlCA_NmJYqYfZw-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v2 4/4] iotests/297: Cover tests/ Date: Wed, 12 May 2021 19:43:18 +0200 Message-Id: <20210512174318.59466-5-mreitz@redhat.com> In-Reply-To: <20210512174318.59466-1-mreitz@redhat.com> References: <20210512174318.59466-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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 , Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 297 so far does not check the named tests, which reside in the tests/ directory (i.e. full path tests/qemu-iotests/tests). Fix it. Thanks to the previous two commits, all named tests pass its scrutiny, so we do not have to add anything to SKIP_FILES. Signed-off-by: Max Reitz Reviewed-by: Willian Rampazzo Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- tests/qemu-iotests/297 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index e3244d40a0..ce0e82e279 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -55,8 +55,9 @@ def is_python_file(filename): =20 =20 def run_linters(): - files =3D [filename for filename in (set(os.listdir('.')) - set(SKIP_F= ILES)) - if is_python_file(filename)] + named_tests =3D [f'tests/{entry}' for entry in os.listdir('tests')] + check_tests =3D set(os.listdir('.') + named_tests) - set(SKIP_FILES) + files =3D [filename for filename in check_tests if is_python_file(file= name)] =20 iotests.logger.debug('Files to be checked:') iotests.logger.debug(', '.join(sorted(files))) --=20 2.31.1