[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/32] migrate-bitmaps-postcopy-test: Fix pylint warnings
From: |
Hanna Reitz |
Subject: |
[PULL 11/32] migrate-bitmaps-postcopy-test: Fix pylint warnings |
Date: |
Wed, 15 Sep 2021 19:52:57 +0200 |
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 <vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210902094017.32902-3-hreitz@redhat.com>
---
.../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.QMPTestCase):
result = self.vm_a.qmp('x-debug-block-dirty-bitmap-sha256',
node='drive0', name='bitmap0')
- self.discards1_sha256 = result['return']['sha256']
+ discards1_sha256 = result['return']['sha256']
# Check, that updating the bitmap by discards works
- assert self.discards1_sha256 != empty_sha256
+ assert discards1_sha256 != empty_sha256
# We want to calculate resulting sha256. Do it in bitmap0, so, disable
# other bitmaps
@@ -148,7 +148,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
result = self.vm_a.qmp('x-debug-block-dirty-bitmap-sha256',
node='drive0', name='bitmap0')
- self.all_discards_sha256 = result['return']['sha256']
+ all_discards_sha256 = result['return']['sha256']
# Now, enable some bitmaps, to be updated during migration
for i in range(2, nb_bitmaps, 2):
@@ -173,10 +173,11 @@ class
TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
event_resume = self.vm_b.event_wait('RESUME')
self.vm_b_events.append(event_resume)
- return event_resume
+ return (event_resume, discards1_sha256, all_discards_sha256)
def test_postcopy_success(self):
- event_resume = self.start_postcopy()
+ event_resume, discards1_sha256, all_discards_sha256 = \
+ self.start_postcopy()
# enabled bitmaps should be updated
apply_discards(self.vm_b, discards2)
@@ -217,7 +218,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
for i in range(0, nb_bitmaps, 5):
result = self.vm_b.qmp('x-debug-block-dirty-bitmap-sha256',
node='drive0', name='bitmap{}'.format(i))
- sha = self.discards1_sha256 if i % 2 else self.all_discards_sha256
+ sha = discards1_sha256 if i % 2 else all_discards_sha256
self.assert_qmp(result, 'return/sha256', sha)
def test_early_shutdown_destination(self):
--
2.31.1
- [PULL 06/32] block/gluster: Do not force-cap *pnum, (continued)
- [PULL 06/32] block/gluster: Do not force-cap *pnum, Hanna Reitz, 2021/09/15
- [PULL 07/32] block/iscsi: Do not force-cap *pnum, Hanna Reitz, 2021/09/15
- [PULL 09/32] iotests: Fix use-{list,dict}-literal warnings, Hanna Reitz, 2021/09/15
- [PULL 13/32] mirror-top-perms: Fix AbnormalShutdown path, Hanna Reitz, 2021/09/15
- [PULL 08/32] iotests: Fix unspecified-encoding pylint warnings, Hanna Reitz, 2021/09/15
- [PULL 15/32] block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts(), Hanna Reitz, 2021/09/15
- [PULL 10/32] iotests/297: Drop 169 and 199 from the skip list, Hanna Reitz, 2021/09/15
- [PULL 14/32] iotests/297: Cover tests/, Hanna Reitz, 2021/09/15
- [PULL 17/32] block: bdrv_inactivate_recurse(): check for permissions and fix crash, Hanna Reitz, 2021/09/15
- [PULL 12/32] migrate-bitmaps-test: Fix pylint warnings, Hanna Reitz, 2021/09/15
- [PULL 11/32] migrate-bitmaps-postcopy-test: Fix pylint warnings,
Hanna Reitz <=
- [PULL 16/32] tests: add migrate-during-backup, Hanna Reitz, 2021/09/15
- [PULL 19/32] qcow2: refactor handle_dependencies() loop body, Hanna Reitz, 2021/09/15
- [PULL 18/32] simplebench: add img_bench_templater.py, Hanna Reitz, 2021/09/15
- [PULL 21/32] qemu-img: Allow target be aligned to sector size, Hanna Reitz, 2021/09/15
- [PULL 20/32] qcow2: handle_dependencies(): relax conflict detection, Hanna Reitz, 2021/09/15
- [PULL 22/32] qcow2-refcount: improve style of check_refcounts_l2(), Hanna Reitz, 2021/09/15
- [PULL 23/32] qcow2: compressed read: simplify cluster descriptor passing, Hanna Reitz, 2021/09/15
- [PULL 25/32] qcow2-refcount: introduce fix_l2_entry_by_zero(), Hanna Reitz, 2021/09/15
- [PULL 24/32] qcow2: introduce qcow2_parse_compressed_l2_entry() helper, Hanna Reitz, 2021/09/15
- [PULL 26/32] qcow2-refcount: fix_l2_entry_by_zero(): also zero L2 entry bitmap, Hanna Reitz, 2021/09/15