mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
iotests/300: Clean up pylint and mypy complaints
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>
This commit is contained in:
parent
636aa64d48
commit
59c9466d58
@ -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'
|
||||
)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user