aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-04-21 15:16:52 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-04-21 15:16:52 -0700
commitda5006445a92bb7801f54a93452fac63ca2f634c (patch)
tree5aee8e24472cfe825cb4d2afc3a7500ffa41b578 /tests
parent378f973a6ce89de16496bc6007f4dffa2f881dbc (diff)
parent47430775ed1a48d7beb2c7b8d7feaab73104ec46 (diff)
downloadqemu-da5006445a92bb7801f54a93452fac63ca2f634c.zip
qemu-da5006445a92bb7801f54a93452fac63ca2f634c.tar.gz
qemu-da5006445a92bb7801f54a93452fac63ca2f634c.tar.bz2
Merge tag 'python-pull-request' of https://gitlab.com/jsnow/qemu into staging
Python patches This PR finalizes the switch from Luiz's QMP library to mine. # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+ber27ys35W+dsvQfe+BBqr8OQ4FAmJhdSEACgkQfe+BBqr8 # OQ43phAAkrqVMU/IJzKKMIYoZtO67gk2u2AG+FNbrQr0FuisnnMSZzvDgnlxQHii # ingLiIFEUNIfj5QxOiD/glbh/QI6GHY5mh/FYdStc4YALb2MqXYPQhW3UCGxDPlF # YqJzWk2WbZ20drxCgRzHN/pI5SQY6N+Ev9jyzP/cvCNIFY7xxe0IhApiNjjZt9e2 # ngZ3pX+xjX94YezTQQ1E6lDUSXDUQ4VZWl/VH8nbEeUbOWLfR238/WOqWkv1SHWM # TtOBeYOLUDjFzplMr4Xbnd9DP/Q3/V8KKT9VHNHcF8eAkOohvxeYJx8AuuohZB4C # qPQj+gaD0cV63qZNNRyetqtCTG6bd+GDt/s3GhUBxsufz+Y3MTMn/3zHlheiaOwO # ZIXiEkdgKxPTx5T6Vo0BJoE4/22VhzBRQuTg/i0bWrzgKAyPDOf8uQnm5vvGV8/H # f7KtXWPoqNVc2wWOh5vJAlsnKFDVW6d+jBbk5jRGofDKvVU31uLLu4eBBHpPgaAs # 9fWd7NgEgqL6ZGYsVSyuwmkhKCLjBtd8K/BGQrpicQUH3J80jagSVnmmmt93KaE3 # HXdZfnE3vxcG45LGdjcu88CHOzUqTEflf6gCGg/ISaP3AlPKPZs2Ck7RPHLK1UeG # 084wYmyuq5C/zXIriBhw75ZGoaJHOdgY31OyMdL1D/Ii+p0h3w0= # =m2An # -----END PGP SIGNATURE----- # gpg: Signature made Thu 21 Apr 2022 08:15:45 AM PDT # gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * tag 'python-pull-request' of https://gitlab.com/jsnow/qemu: python/qmp: remove pylint workaround from legacy.py python: rename 'aqmp-tui' to 'qmp-tui' python: rename qemu.aqmp to qemu.qmp python: re-enable pylint duplicate-code warnings python: remove the old QMP package python/aqmp: copy qmp docstrings to qemu.aqmp.legacy python/aqmp: fully separate from qmp.QEMUMonitorProtocol python/aqmp: take QMPBadPortError and parse_address from qemu.qmp python: temporarily silence pylint duplicate-code warnings python/aqmp-tui: relicense as LGPLv2+ python/qmp-shell: relicense as LGPLv2+ python/aqmp: relicense as LGPLv2+ python/aqmp: add explicit GPLv2 license to legacy.py iotests: switch to AQMP iotests/mirror-top-perms: switch to AQMP scripts/bench-block-job: switch to AQMP python/machine: permanently switch to AQMP Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemu-iotests/iotests.py3
-rwxr-xr-xtests/qemu-iotests/tests/mirror-top-perms11
2 files changed, 5 insertions, 9 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index fe10a6c..33a4467 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -37,9 +37,8 @@ import unittest
from contextlib import contextmanager
-from qemu.aqmp.legacy import QEMUMonitorProtocol
from qemu.machine import qtest
-from qemu.qmp import QMPMessage
+from qemu.qmp.legacy import QMPMessage, QEMUMonitorProtocol
from qemu.utils import VerboseProcessError
# Use this logger for logging messages directly from the iotests module
diff --git a/tests/qemu-iotests/tests/mirror-top-perms b/tests/qemu-iotests/tests/mirror-top-perms
index 6ac8d5e..8bca592 100755
--- a/tests/qemu-iotests/tests/mirror-top-perms
+++ b/tests/qemu-iotests/tests/mirror-top-perms
@@ -22,7 +22,6 @@
import os
from qemu.machine import machine
-from qemu.qmp import QMPConnectError
import iotests
from iotests import change_log_level, qemu_img
@@ -98,15 +97,13 @@ class TestMirrorTopPerms(iotests.QMPTestCase):
self.vm_b.add_blockdev(f'file,node-name=drive0,filename={source}')
self.vm_b.add_device('virtio-blk,drive=drive0,share-rw=on')
try:
- # Silence AQMP errors temporarily.
- # TODO: Remove this and just allow the errors to be logged when
- # AQMP fully replaces QMP.
- with change_log_level('qemu.aqmp'):
+ # Silence QMP logging errors temporarily.
+ with change_log_level('qemu.qmp'):
self.vm_b.launch()
print('ERROR: VM B launched successfully, '
'this should not have happened')
- except (QMPConnectError, machine.VMLaunchFailure):
- assert 'Is another process using the image' in self.vm_b.get_log()
+ except machine.VMLaunchFailure as exc:
+ assert 'Is another process using the image' in exc.output
result = self.vm.qmp('block-job-cancel',
device='mirror')