diff options
author | John Snow | 2021-10-26 19:56:08 +0200 |
---|---|---|
committer | John Snow | 2021-11-01 16:54:59 +0100 |
commit | 3bd559467d979165065f8406d2016aaa31f2cee2 (patch) | |
tree | 7843c840284d2ad96d9b6cf04b0577376d36e70e /tests | |
parent | python/aqmp: Remove scary message (diff) | |
download | qemu-3bd559467d979165065f8406d2016aaa31f2cee2.tar.gz qemu-3bd559467d979165065f8406d2016aaa31f2cee2.tar.xz qemu-3bd559467d979165065f8406d2016aaa31f2cee2.zip |
iotests: Accommodate async QMP Exception classes
(But continue to support the old ones for now, too.)
There are very few cases of any user of QEMUMachine or a subclass
thereof relying on a QMP Exception type. If you'd like to check for
yourself, you want to grep for all of the derivatives of QMPError,
excluding 'AQMPError' and its derivatives. That'd be these:
- QMPError
- QMPConnectError
- QMPCapabilitiesError
- QMPTimeoutError
- QMPProtocolError
- QMPResponseError
- QMPBadPortError
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20211026175612.4127598-5-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/qemu-iotests/tests/mirror-top-perms | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/qemu-iotests/tests/mirror-top-perms b/tests/qemu-iotests/tests/mirror-top-perms index 3d475aa3a5..a2d5c269d7 100755 --- a/tests/qemu-iotests/tests/mirror-top-perms +++ b/tests/qemu-iotests/tests/mirror-top-perms @@ -21,8 +21,9 @@ import os -from qemu import qmp +from qemu.aqmp import ConnectError from qemu.machine import machine +from qemu.qmp import QMPConnectError import iotests from iotests import qemu_img @@ -102,7 +103,7 @@ class TestMirrorTopPerms(iotests.QMPTestCase): self.vm_b.launch() print('ERROR: VM B launched successfully, this should not have ' 'happened') - except qmp.QMPConnectError: + except (QMPConnectError, ConnectError): assert 'Is another process using the image' in self.vm_b.get_log() result = self.vm.qmp('block-job-cancel', |