aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-11-03 15:59:44 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-11-03 15:59:44 +0000
commit8507c9d5c9a62de2a0e281b640f995e26eac46af (patch)
treee99cddf604d9d2cdc5588a1e354062c533ff9f01 /tests
parentad262888993f795db68fd7c2bdfa72f467fe0096 (diff)
parentc9eb2f3e386840844bcc91e66d0a3475bc650780 (diff)
downloadqemu-8507c9d5c9a62de2a0e281b640f995e26eac46af.zip
qemu-8507c9d5c9a62de2a0e281b640f995e26eac46af.tar.gz
qemu-8507c9d5c9a62de2a0e281b640f995e26eac46af.tar.bz2
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches: - iotests: Fix pylint/mypy warnings with Python 3.9 - qmp: fix aio_poll() assertion failure on Windows - Some minor fixes # gpg: Signature made Tue 03 Nov 2020 15:25:01 GMT # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kwolf@redhat.com" # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: block/vvfat: Fix bad printf format specifiers iotests: Use Python 3 style super() iotests: Disable unsubscriptable-object in pylint iotests.py: Fix type check errors in wait_migration() qemu-img convert: Free @sn_opts in all error cases qmp: fix aio_poll() assertion failure on Windows Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemu-iotests/iotests.py12
-rw-r--r--tests/qemu-iotests/pylintrc2
2 files changed, 10 insertions, 4 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 63d2ace..814804a 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -543,10 +543,10 @@ class VM(qtest.QEMUQtestMachine):
def __init__(self, path_suffix=''):
name = "qemu%s-%d" % (path_suffix, os.getpid())
- super(VM, self).__init__(qemu_prog, qemu_opts, name=name,
- test_dir=test_dir,
- socket_scm_helper=socket_scm_helper,
- sock_dir=sock_dir)
+ super().__init__(qemu_prog, qemu_opts, name=name,
+ test_dir=test_dir,
+ socket_scm_helper=socket_scm_helper,
+ sock_dir=sock_dir)
self._num_drives = 0
def add_object(self, opts):
@@ -747,6 +747,10 @@ class VM(qtest.QEMUQtestMachine):
def wait_migration(self, expect_runstate: Optional[str]) -> bool:
while True:
event = self.event_wait('MIGRATION')
+ # We use the default timeout, and with a timeout, event_wait()
+ # never returns None
+ assert event
+
log(event, filters=[filter_qmp_event])
if event['data']['status'] in ('completed', 'failed'):
break
diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc
index 5481afe..cd3702e 100644
--- a/tests/qemu-iotests/pylintrc
+++ b/tests/qemu-iotests/pylintrc
@@ -17,6 +17,8 @@ disable=invalid-name,
too-many-lines,
too-many-locals,
too-many-public-methods,
+ # pylint warns about Optional[] etc. as unsubscriptable in 3.9
+ unsubscriptable-object,
# These are temporary, and should be removed:
missing-docstring,