[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/53] iotests/300: Clean up pylint and mypy complaints
From: |
Max Reitz |
Subject: |
[PULL 24/53] iotests/300: Clean up pylint and mypy complaints |
Date: |
Tue, 26 Jan 2021 15:19:47 +0100 |
And consequentially drop it from 297's skip list.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210118105720.14824-11-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 79e63f8625..a37910b42d 100755
--- a/tests/qemu-iotests/297
+++ b/tests/qemu-iotests/297
@@ -34,7 +34,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 38ef5945b7..43264d883d 100755
--- a/tests/qemu-iotests/300
+++ b/tests/qemu-iotests/300
@@ -23,7 +23,11 @@ import os
import random
import re
from typing import Dict, List, Optional, Union
+
import iotests
+
+# Import qemu after iotests.py has amended sys.path
+# pylint: disable=wrong-import-order
import qemu
BlockBitmapMapping = List[Dict[str, Union[str, List[Dict[str, str]]]]]
@@ -111,10 +115,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,
@@ -446,9 +454,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
--
2.29.2
- [PULL 20/53] iotests/129: Use throttle node, (continued)
- [PULL 20/53] iotests/129: Use throttle node, Max Reitz, 2021/01/26
- [PULL 22/53] iotests/129: Limit mirror job's buffer size, Max Reitz, 2021/01/26
- [PULL 15/53] iotests.py: Assume a couple of variables as given, Max Reitz, 2021/01/26
- [PULL 18/53] iotests/129: Remove test images in tearDown(), Max Reitz, 2021/01/26
- [PULL 19/53] iotests/129: Do not check @busy, Max Reitz, 2021/01/26
- [PULL 25/53] coroutine-sigaltstack: Add SIGUSR2 mutex, Max Reitz, 2021/01/26
- [PULL 27/53] block/block-copy: More explicit call_state, Max Reitz, 2021/01/26
- [PULL 23/53] iotests/129: Clean up pylint and mypy complaints, Max Reitz, 2021/01/26
- [PULL 26/53] qapi: backup: add perf.use-copy-range parameter, Max Reitz, 2021/01/26
- [PULL 21/53] iotests/129: Actually test a commit job, Max Reitz, 2021/01/26
- [PULL 24/53] iotests/300: Clean up pylint and mypy complaints,
Max Reitz <=
- [PULL 28/53] block/block-copy: implement block_copy_async, Max Reitz, 2021/01/26
- [PULL 30/53] block/block-copy: add list of all call-states, Max Reitz, 2021/01/26
- [PULL 29/53] block/block-copy: add max_chunk and max_workers parameters, Max Reitz, 2021/01/26
- [PULL 31/53] block/block-copy: add ratelimit to block-copy, Max Reitz, 2021/01/26
- [PULL 33/53] blockjob: add set_speed to BlockJobDriver, Max Reitz, 2021/01/26
- [PULL 34/53] job: call job_enter from job_pause, Max Reitz, 2021/01/26
- [PULL 35/53] qapi: backup: add max-chunk and max-workers to x-perf struct, Max Reitz, 2021/01/26
- [PULL 32/53] block/block-copy: add block_copy_cancel, Max Reitz, 2021/01/26
- [PULL 36/53] iotests: 56: prepare for backup over block-copy, Max Reitz, 2021/01/26
- [PULL 37/53] iotests/129: Limit backup's max-chunk/max-workers, Max Reitz, 2021/01/26