diff options
author | John Snow <jsnow@redhat.com> | 2021-09-23 14:07:13 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2021-10-06 10:25:55 +0200 |
commit | ac7424631943c0c015934a3c92dca87b70f8f8e9 (patch) | |
tree | 2ba6e3088fffad737fddd4d1f686075308d35cdd /tests/qemu-iotests | |
parent | f39decb583669e4335eaf2d1a5b8183254df51d6 (diff) |
iotests/mirror-top-perms: Adjust imports
We need to import subpackages from the qemu namespace package; importing
the namespace package alone doesn't bring the subpackages with it --
unless someone else (like iotests.py) imports them too.
Adjust the imports.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210923180715.4168522-5-jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rwxr-xr-x | tests/qemu-iotests/tests/mirror-top-perms | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/qemu-iotests/tests/mirror-top-perms b/tests/qemu-iotests/tests/mirror-top-perms index 73138a0ef9..3d475aa3a5 100755 --- a/tests/qemu-iotests/tests/mirror-top-perms +++ b/tests/qemu-iotests/tests/mirror-top-perms @@ -21,7 +21,8 @@ import os -import qemu +from qemu import qmp +from qemu.machine import machine import iotests from iotests import qemu_img @@ -46,7 +47,7 @@ class TestMirrorTopPerms(iotests.QMPTestCase): def tearDown(self): try: self.vm.shutdown() - except qemu.machine.machine.AbnormalShutdown: + except machine.AbnormalShutdown: pass if self.vm_b is not None: @@ -101,7 +102,7 @@ class TestMirrorTopPerms(iotests.QMPTestCase): self.vm_b.launch() print('ERROR: VM B launched successfully, this should not have ' 'happened') - except qemu.qmp.QMPConnectError: + except qmp.QMPConnectError: assert 'Is another process using the image' in self.vm_b.get_log() result = self.vm.qmp('block-job-cancel', |