From nobody Tue May 14 01:01:53 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=1621008192; cv=none; d=zohomail.com; s=zohoarc; b=URO7wJcwfnBve5cHquu2EqNJWYrNvN0KZ5P/oGz1kHLoszLyfRAvlEGuMwzgLcrjQKO+Ee+NC17brfA7mtkaokFxlqp0307XBGkPbHPH5r5ndRPMom6yCortoeoDew8w4AAY++Xh9+PaLZUAgppMz3f9GvTxUrubyhaJ8jZj3C0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621008192; 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=E4aicOFuR1gw4YhCaC7VVcPTQJtBZoCOEc+h2Rpma3eMyk4b5sFUsybpGS3+xzEe0BHhHc6gbr2dTvAbSN5EeY4hH/70tuKV9PfCs9m+VXvabddNBkkymjAywMr5thkE3XVPV2wrIm/mxnIF8naRlyQscWnsy2IYziieWTaV8qs= 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 1621008192179708.3789102408451; Fri, 14 May 2021 09:03:12 -0700 (PDT) Received: from localhost ([::1]:59164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhaHP-0002T9-Cl for importer@patchew.org; Fri, 14 May 2021 12:03:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhZyw-00056L-2r for qemu-devel@nongnu.org; Fri, 14 May 2021 11:44:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhZys-0003vK-QB for qemu-devel@nongnu.org; Fri, 14 May 2021 11:44:05 -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-351-Ro8UMh0COvaYxBieJKd3JA-1; Fri, 14 May 2021 11:43:56 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 37C4AA0CAD; Fri, 14 May 2021 15:43:55 +0000 (UTC) Received: from localhost (ovpn-114-49.ams2.redhat.com [10.36.114.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D392019C79; Fri, 14 May 2021 15:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621007039; 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=ZiZKdxw+QSmfpQVB7JVRUzZMrTmiHk/r/xWYkNBcuofMLyU6FUR08SEi+RyOQh7pW0hrIl vHZbu3f5lpxGrdtr2PhEKyaAmFBdQIMLyQM+6wfEx2vpSBBLivS9kvpUzIcPCwGSCNoikF o5sGYpqiLPy731Vi2uZCyLMP7STEZEg= X-MC-Unique: Ro8UMh0COvaYxBieJKd3JA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v3 1/4] iotests/297: Drop 169 and 199 from the skip list Date: Fri, 14 May 2021 17:43:48 +0200 Message-Id: <20210514154351.629027-2-mreitz@redhat.com> In-Reply-To: <20210514154351.629027-1-mreitz@redhat.com> References: <20210514154351.629027-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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=216.205.24.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.699, 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 Tue May 14 01:01:53 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=1621008608; cv=none; d=zohomail.com; s=zohoarc; b=WmtIzxoM/VJrtgzB4i8i0/ZVTvLAcpaGWTJ7ADSHL9HoBwuS47ltFhjJ0g7bLvBtsheCdWN07bDLZvHVnoWeKoJp48MU3kK+KyyhR2RAsPngJbfd32IBEEbe+pzRWja6Jd4zniHpdTyZYcIHnXfEBx5l1JcZbLaYXUVF6C1GeIM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621008608; 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=vvy0avLLTQPClZSN7JLOGBQ6GyRcfEaVwNTLiW/8Vjo=; b=H9slQbWE4rW47TEQmFJEyz9EuFzDf351RsGiRAWjvFq3/MvnJjyHOnAMCfF1Jfk+8oZkEOsJpR9sMrAKf0Ej/GLsBcgApsWyKYk4c7pqw9zBm5iFCtp/6Wfke2jbBa1ZCT2mCZX+mNl9YAm5ZaM8qgdSjeWn6Lh/vwkyMmMfnRI= 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 1621008608799699.7481584471717; Fri, 14 May 2021 09:10:08 -0700 (PDT) Received: from localhost ([::1]:52648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhaO7-0000qK-VN for importer@patchew.org; Fri, 14 May 2021 12:10:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhZyy-0005Fa-Qp for qemu-devel@nongnu.org; Fri, 14 May 2021 11:44:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhZyv-0003x9-Lf for qemu-devel@nongnu.org; Fri, 14 May 2021 11:44:08 -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-586-E394DCGiMQaXfedO5swhaQ-1; Fri, 14 May 2021 11:43:58 -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 3F2601883521; Fri, 14 May 2021 15:43:57 +0000 (UTC) Received: from localhost (ovpn-114-49.ams2.redhat.com [10.36.114.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D77FA5D9D0; Fri, 14 May 2021 15:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621007045; 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=vvy0avLLTQPClZSN7JLOGBQ6GyRcfEaVwNTLiW/8Vjo=; b=WHGHc06dJngqDJKJPu8EnEPxVJJtZ0moPPhyEhl7ns6HyrnfAw9wJ3h4dBguea18oTa/jG JaYbg3ScOqfNkGipRTcJLBzRjRm+s/HeUa4/yTSgmajUYH81vFQWjxHwE8nNg4i4vlJl8G eVCUfjFIRiD5hPPypGGgmvwfV2N3PLk= X-MC-Unique: E394DCGiMQaXfedO5swhaQ-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v3 2/4] migrate-bitmaps-postcopy-test: Fix pylint warnings Date: Fri, 14 May 2021 17:43:49 +0200 Message-Id: <20210514154351.629027-3-mreitz@redhat.com> In-Reply-To: <20210514154351.629027-1-mreitz@redhat.com> References: <20210514154351.629027-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.699, 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" 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 Tue May 14 01:01:53 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=1621008765; cv=none; d=zohomail.com; s=zohoarc; b=T8xxQ8bZkeAxLfOCTEvhD8Y3Sab/4F+ABWw+GPluCcMp85Htnul/UR0ejBfxAbbLsR0Pu5y4BYdWY1JGS7Zv8lURJsdnBe1NY+LehEcE2qU6JCUuHzrAWRGDg8jZycdl+p21tvfsd1moLGDUswhqYQoDUAcC08HxRQFtNaMkFjE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621008765; 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=6RxWmuxQJ5w5m14n4xoHP5xJc2oDVTM/fvXwfsKKYDI=; b=RJocw4V4O3QSqaX05IGaWTQ7SUzo9c24VhYEWRzvP8hcOl8VDVJDLh8UxSQATs4SY6gEWRuNc8UZqnZK+sGYt61ywopdDEpyVeFKs6T0hO8ey45VosU0bO016SHAFy8jX7gmvEDaexN8Rdfw65/v49mdD9eZDMiAjT1yVGZq+yA= 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 1621008765930608.2675709246357; Fri, 14 May 2021 09:12:45 -0700 (PDT) Received: from localhost ([::1]:34046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhaQf-0007xx-72 for importer@patchew.org; Fri, 14 May 2021 12:12:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhZyy-0005D2-5X for qemu-devel@nongnu.org; Fri, 14 May 2021 11:44:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhZyv-0003x2-1R for qemu-devel@nongnu.org; Fri, 14 May 2021 11:44:07 -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-250-1J2VVlH1PiuBgUr8UtptmA-1; Fri, 14 May 2021 11:44:00 -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 74FD4107ACCA; Fri, 14 May 2021 15:43:59 +0000 (UTC) Received: from localhost (ovpn-114-49.ams2.redhat.com [10.36.114.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 046CB60CC6; Fri, 14 May 2021 15:43:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621007044; 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=6RxWmuxQJ5w5m14n4xoHP5xJc2oDVTM/fvXwfsKKYDI=; b=gMjhqLh2sshl5+ive3bsAv1NV2+AP7/fJxCxbSygQFdORM9GKDjBopMuLZmNP5RCfjJn4c 0BE0CAZYTxk9JXHFrlBm+IsQVvFBNS4ODnRKpjuHOf4Cf/DLYCi/gVKXmi/HxSFQJhhMAz uSDl2j/7P8MM865TNyW6B0iF7QeyMo8= X-MC-Unique: 1J2VVlH1PiuBgUr8UtptmA-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v3 3/4] migrate-bitmaps-test: Fix pylint warnings Date: Fri, 14 May 2021 17:43:50 +0200 Message-Id: <20210514154351.629027-4-mreitz@redhat.com> In-Reply-To: <20210514154351.629027-1-mreitz@redhat.com> References: <20210514154351.629027-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.699, 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" 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)" were equivalent to just "mc", but in inject_test_case(), it is not equivalent, so add a comment and disable the warning locally - 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: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/migrate-bitmaps-test | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-test b/tests/qemu-iot= ests/tests/migrate-bitmaps-test index a5c7bc83e0..31d3255943 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,20 @@ 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)) + # The lambda is required to enforce the `self` parameter. Without it, + # `mc` would be called without any arguments, and then complain. + # pylint: disable=3Dunnecessary-lambda + setattr(klass, 'test_' + method + suffix, lambda self: mc(self)) + =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 +274,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 +292,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 Tue May 14 01:01:53 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=1621007540; cv=none; d=zohomail.com; s=zohoarc; b=hwjG+5CEPKN8gWd2+5E/da7ok+TK8xnWv1ZFiemxD8+KUpPYlCwt4GJEEqEczAm3AeJwMibFGiyLVDyvLci2q0Z+erZQ8FuXhRzWiQs+AJUzqwOCFvdS0nhPZWuv1YMHSxV8LYNOt3FpMSeyoO52Qy/nRvQ3VSlZ1VOEGhpAF8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621007540; 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=EXsawjMFzaZdFdZ6cHI4Uug4fiZl4DnIF2LieA5PXyaztruTjoBtVVwIbuAuxjSYTNSWqf6diK/mfhyu95WI6oktbYeBvbKsPzBxxEYuTHXULdPmQR0NwsdM0Dy6v2KDzCbrSLSBh3ayjxtZrfi9+CDZQfoKlf9Cy+3UAURsy4o= 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 1621007540003176.268886207656; Fri, 14 May 2021 08:52:20 -0700 (PDT) Received: from localhost ([::1]:60196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lha6s-0000cx-Pl for importer@patchew.org; Fri, 14 May 2021 11:52:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhZz9-0005QT-LH for qemu-devel@nongnu.org; Fri, 14 May 2021 11:44:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhZz4-0003zx-Ui for qemu-devel@nongnu.org; Fri, 14 May 2021 11:44:19 -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-42-kdlpeuKVM6G-Jo3QErgQWQ-1; Fri, 14 May 2021 11:44:09 -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 3D7A8A0CAB; Fri, 14 May 2021 15:44:08 +0000 (UTC) Received: from localhost (ovpn-114-49.ams2.redhat.com [10.36.114.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1299F5D9D0; Fri, 14 May 2021 15:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621007050; 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=avHmmspvk9FAvFoMczG2mcsgPuvKIO8D7vNvYoiOfJ9dCJrcRDqQEQOQ9JgA0Rja020Zjl vA8I1Qlwyqd1xPNioZd2dvsTTllox2/tfsiJiw9R+/ClhyFkT+1P6Vbnlhbd/K61jgbL6o O/2SYZLWOXdzKd3mlooJIkyJ63GUDcc= X-MC-Unique: kdlpeuKVM6G-Jo3QErgQWQ-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH v3 4/4] iotests/297: Cover tests/ Date: Fri, 14 May 2021 17:43:51 +0200 Message-Id: <20210514154351.629027-5-mreitz@redhat.com> In-Reply-To: <20210514154351.629027-1-mreitz@redhat.com> References: <20210514154351.629027-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.699, 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" 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