mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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>
This commit is contained in:
parent
0f71c9a936
commit
3bd559467d
2 changed files with 5 additions and 3 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue