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 v3 10/10] iotests/300: Clean up pylint and mypy complaints
Date: Fri, 15 Jan 2021 12:59:20 +0100	[thread overview]
Message-ID: <1e1a09ff-1a96-c565-e590-2d5716945645@redhat.com> (raw)
In-Reply-To: <5e2cc423-124f-3b63-2804-d0fe99e30826@virtuozzo.com>

On 15.01.21 12:30, Vladimir Sementsov-Ogievskiy wrote:
> 14.01.2021 20:03, Max Reitz wrote:
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>>   tests/qemu-iotests/297 |  2 +-
>>   tests/qemu-iotests/300 | 18 +++++++++++++++---
>>   2 files changed, 16 insertions(+), 4 deletions(-)
>>
>> diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297
>> index 1dce1d1b1c..03d8604538 100755
>> --- a/tests/qemu-iotests/297
>> +++ b/tests/qemu-iotests/297
>> @@ -33,7 +33,7 @@ SKIP_FILES = (
>>       '218', '219', '222', '224', '228', '234', '235', '236', '237', 
>> '238',
>>       '240', '242', '245', '246', '248', '255', '256', '257', '258', 
>> '260',
>>       '262', '264', '266', '274', '277', '280', '281', '295', '296', 
>> '298',
>> -    '299', '300', '302', '303', '304', '307',
>> +    '299', '302', '303', '304', '307',
> 
>>       'nbd-fault-injector.py', 'qcow2.py', 'qcow2_format.py', 'qed.py'
>>   )
>> diff --git a/tests/qemu-iotests/300 b/tests/qemu-iotests/300
>> index b864a21d5e..64d388a8fa 100755
>> --- a/tests/qemu-iotests/300
>> +++ b/tests/qemu-iotests/300
>> @@ -22,7 +22,11 @@ import os
>>   import random
>>   import re
>>   from typing import Dict, List, Optional, Union
>> +
>>   import iotests
>> +
>> +# Import qemu after iotests.py has amended the PYTHONPATH
> 
> you mean os.path, exactly,
> 
>   sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 
> 'python'))
> 
> yes?

Indeed.

>> +# pylint: disable=wrong-import-order
>>   import qemu
>>   BlockBitmapMapping = List[Dict[str, Union[str, List[Dict[str, str]]]]]
>> @@ -110,10 +114,14 @@ class 
>> TestDirtyBitmapMigration(iotests.QMPTestCase):
>>           If @msg is None, check that there has not been any error.
>>           """
>>           self.vm_b.shutdown()
>> +
>> +        log = self.vm_b.get_log()
>> +        assert log is not None # Loaded after shutdown
>> +
>>           if msg is None:
>> -            self.assertNotIn('qemu-system-', self.vm_b.get_log())
>> +            self.assertNotIn('qemu-system-', log)
>>           else:
>> -            self.assertIn(msg, self.vm_b.get_log())
>> +            self.assertIn(msg, log)
>>       @staticmethod
>>       def mapping(node_name: str, node_alias: str,
>> @@ -445,9 +453,13 @@ class 
>> TestBlockBitmapMappingErrors(TestDirtyBitmapMigration):
>>           # Check for the error in the source's log
>>           self.vm_a.shutdown()
>> +
>> +        log = self.vm_a.get_log()
>> +        assert log is not None # Loaded after shutdown
>> +
>>           self.assertIn(f"Cannot migrate bitmap '{name}' on node "
>>                         f"'{self.src_node_name}': Name is longer than 
>> 255 bytes",
>> -                      self.vm_a.get_log())
>> +                      log)
>>           # Expect abnormal shutdown of the destination VM because of
>>           # the failed migration
>>
> 
> Your new comments are the only PEP8 complains in the 300 iotest:
> 
> flake8 300
> 300:119:31: E261 at least two spaces before inline comment
> 300:458:31: E261 at least two spaces before inline comment
> 
> So, I'd fix them.

Haha, sure :)

> anyway:
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

Thanks!



  reply	other threads:[~2021-01-15 12:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 17:02 [PATCH v3 00/10] iotests: Fix 129 and expand 297’s reach Max Reitz
2021-01-14 17:02 ` [PATCH v3 01/10] iotests.py: Assume a couple of variables as given Max Reitz
2021-01-15  9:19   ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:02 ` [PATCH v3 02/10] iotests/297: Rewrite in Python and extend reach Max Reitz
2021-01-15 11:13   ` Vladimir Sementsov-Ogievskiy
2021-01-15 11:57     ` Max Reitz
2021-01-15 12:37       ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:02 ` [PATCH v3 03/10] iotests: Move try_remove to iotests.py Max Reitz
2021-01-15 11:14   ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:02 ` [PATCH v3 04/10] iotests/129: Remove test images in tearDown() Max Reitz
2021-01-15 14:48   ` Willian Rampazzo
2021-01-14 17:02 ` [PATCH v3 05/10] iotests/129: Do not check @busy Max Reitz
2021-01-14 17:03 ` [PATCH v3 06/10] iotests/129: Use throttle node Max Reitz
2021-01-15 11:16   ` Vladimir Sementsov-Ogievskiy
2021-01-15 11:58     ` Max Reitz
2021-01-14 17:03 ` [PATCH v3 07/10] iotests/129: Actually test a commit job Max Reitz
2021-01-14 17:03 ` [PATCH v3 08/10] iotests/129: Limit mirror job's buffer size Max Reitz
2021-01-15 14:49   ` Willian Rampazzo
2021-01-14 17:03 ` [PATCH v3 09/10] iotests/129: Clean up pylint and mypy complaints Max Reitz
2021-01-14 20:02   ` Willian Rampazzo
2021-01-15  9:30     ` Max Reitz
2021-01-15 14:43       ` Willian Rampazzo
2021-01-15 11:18   ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:03 ` [PATCH v3 10/10] iotests/300: " Max Reitz
2021-01-15 11:30   ` Vladimir Sementsov-Ogievskiy
2021-01-15 11:59     ` Max Reitz [this message]
2021-01-15 11:53 ` [PATCH v3 11/10] iotests: add flake8 linter Vladimir Sementsov-Ogievskiy
2021-01-15 12:03   ` Max Reitz
2021-01-15 13:30     ` Vladimir Sementsov-Ogievskiy

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=1e1a09ff-1a96-c565-e590-2d5716945645@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).