pylint: fix errors and warnings generated by tests/qemu-iotests/297
Test 297 in tests/qemu-iotests currently fails: pylint has learned new things to check, or we simply missed them. All fixes in this patch are related to additional spaces used or wrong indentation. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Message-Id: <20211008062821.1010967-2-eesposit@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
This commit is contained in:
parent
9a5d135267
commit
87e4d4a205
@ -77,8 +77,8 @@ class TestStopWithBlockJob(iotests.QMPTestCase):
|
|||||||
self.do_test_stop("drive-backup", device="drive0",
|
self.do_test_stop("drive-backup", device="drive0",
|
||||||
target=self.target_img, format=iotests.imgfmt,
|
target=self.target_img, format=iotests.imgfmt,
|
||||||
sync="full",
|
sync="full",
|
||||||
x_perf={ 'max-chunk': 65536,
|
x_perf={'max-chunk': 65536,
|
||||||
'max-workers': 8 })
|
'max-workers': 8})
|
||||||
|
|
||||||
def test_block_commit(self):
|
def test_block_commit(self):
|
||||||
# Add overlay above the source node so that we actually use a
|
# Add overlay above the source node so that we actually use a
|
||||||
|
@ -37,10 +37,11 @@ def make_argparser() -> argparse.ArgumentParser:
|
|||||||
|
|
||||||
p.add_argument('-d', dest='debug', action='store_true', help='debug')
|
p.add_argument('-d', dest='debug', action='store_true', help='debug')
|
||||||
p.add_argument('-p', dest='print', action='store_true',
|
p.add_argument('-p', dest='print', action='store_true',
|
||||||
help='redirects qemu\'s stdout and stderr to the test output')
|
help='redirects qemu\'s stdout and stderr to '
|
||||||
|
'the test output')
|
||||||
p.add_argument('-gdb', action='store_true',
|
p.add_argument('-gdb', action='store_true',
|
||||||
help="start gdbserver with $GDB_OPTIONS options \
|
help="start gdbserver with $GDB_OPTIONS options "
|
||||||
('localhost:12345' if $GDB_OPTIONS is empty)")
|
"('localhost:12345' if $GDB_OPTIONS is empty)")
|
||||||
p.add_argument('-valgrind', action='store_true',
|
p.add_argument('-valgrind', action='store_true',
|
||||||
help='use valgrind, sets VALGRIND_QEMU environment '
|
help='use valgrind, sets VALGRIND_QEMU environment '
|
||||||
'variable')
|
'variable')
|
||||||
|
@ -1363,7 +1363,8 @@ class ReproducibleStreamWrapper:
|
|||||||
|
|
||||||
class ReproducibleTestRunner(unittest.TextTestRunner):
|
class ReproducibleTestRunner(unittest.TextTestRunner):
|
||||||
def __init__(self, stream: Optional[TextIO] = None,
|
def __init__(self, stream: Optional[TextIO] = None,
|
||||||
resultclass: Type[unittest.TestResult] = ReproducibleTestResult,
|
resultclass: Type[unittest.TestResult] =
|
||||||
|
ReproducibleTestResult,
|
||||||
**kwargs: Any) -> None:
|
**kwargs: Any) -> None:
|
||||||
rstream = ReproducibleStreamWrapper(stream or sys.stdout)
|
rstream = ReproducibleStreamWrapper(stream or sys.stdout)
|
||||||
super().__init__(stream=rstream, # type: ignore
|
super().__init__(stream=rstream, # type: ignore
|
||||||
|
@ -115,8 +115,8 @@ def do_test(use_cbw, base_img_path, fleece_img_path, nbd_sock_path, vm):
|
|||||||
|
|
||||||
nbd_uri = 'nbd+unix:///%s?socket=%s' % (tmp_node, nbd_sock_path)
|
nbd_uri = 'nbd+unix:///%s?socket=%s' % (tmp_node, nbd_sock_path)
|
||||||
log(vm.qmp('nbd-server-start',
|
log(vm.qmp('nbd-server-start',
|
||||||
{'addr': { 'type': 'unix',
|
{'addr': {'type': 'unix',
|
||||||
'data': { 'path': nbd_sock_path } } }))
|
'data': {'path': nbd_sock_path}}}))
|
||||||
|
|
||||||
log(vm.qmp('nbd-server-add', device=tmp_node))
|
log(vm.qmp('nbd-server-add', device=tmp_node))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user