qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/4] migrate-bitmaps-postcopy-test: Fix pylint warnings
Date: Tue, 30 Mar 2021 19:18:45 +0200	[thread overview]
Message-ID: <3fea2027-c8a3-ab65-cd3a-01f7d0c6bb15@redhat.com> (raw)
In-Reply-To: <0f1f876b-e93c-4234-4c4c-3de19a3c577c@virtuozzo.com>

On 30.03.21 18:47, Vladimir Sementsov-Ogievskiy wrote:
> 29.03.2021 16:26, Max Reitz wrote:
>> pylint complains that discards1_sha256 and all_discards_sha256 are first
>> set in non-__init__ methods.  Let's make it happy.
>>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>>   tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test 
>> b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
>> index 584062b412..013e94fc39 100755
>> --- a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
>> +++ b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
>> @@ -76,6 +76,9 @@ def check_bitmaps(vm, count):
>>   class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
>> +    discards1_sha256 = None
>> +    all_discards_sha256 = None
>> +
>>       def tearDown(self):
>>           if debug:
>>               self.vm_a_events += self.vm_a.get_qmp_events()
>>
> 
> I'd prefer not making them class-variables. I think initializing them in 
> setUp should work (as a lot of other variables are initialized in 
> setUp() and pylint doesn't complain). And better thing is return it 
> together with event_resume from start_postcopy(), as actually it's a 
> kind of result of the function.

Oh, that sounds good.  Is a list fine, i.e. return (event_resume, 
discards1_sha256, all_discards_sha256)?

(We could also make it an object.  I don’t know what Python prefers. :))

Max



  reply	other threads:[~2021-03-30 17:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 13:26 [PATCH 0/4] iotests/297: Cover tests/ Max Reitz
2021-03-29 13:26 ` [PATCH 1/4] iotests/297: Drop 169 and 199 from the skip list Max Reitz
2021-03-29 15:35   ` Willian Rampazzo
2021-03-30 16:42   ` Vladimir Sementsov-Ogievskiy
2021-03-29 13:26 ` [PATCH 2/4] migrate-bitmaps-postcopy-test: Fix pylint warnings Max Reitz
2021-03-29 15:36   ` Willian Rampazzo
2021-03-30 16:47   ` Vladimir Sementsov-Ogievskiy
2021-03-30 17:18     ` Max Reitz [this message]
2021-03-30 17:36       ` Vladimir Sementsov-Ogievskiy
2021-03-29 13:26 ` [PATCH 3/4] migrate-bitmaps-test: " Max Reitz
2021-03-29 15:39   ` Willian Rampazzo
2021-03-30 16:55   ` Vladimir Sementsov-Ogievskiy
2021-03-29 13:26 ` [PATCH 4/4] iotests/297: Cover tests/ Max Reitz
2021-03-29 15:40   ` Willian Rampazzo
2021-03-30 17:00   ` Vladimir Sementsov-Ogievskiy
2021-04-07 16:50 ` [PATCH 0/4] " Kevin Wolf
2021-05-05  8:02 ` Vladimir Sementsov-Ogievskiy
2021-05-12 17:39   ` Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3fea2027-c8a3-ab65-cd3a-01f7d0c6bb15@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).