Skip to content

Commit ac74246

Browse files
jnsnowkevmw
authored andcommitted
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 <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Hanna Reitz <[email protected]> Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]> Reviewed-by: Kevin Wolf <[email protected]> Message-Id: <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
1 parent f39decb commit ac74246

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/qemu-iotests/tests/mirror-top-perms

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
import os
2323

24-
import qemu
24+
from qemu import qmp
25+
from qemu.machine import machine
2526

2627
import iotests
2728
from iotests import qemu_img
@@ -46,7 +47,7 @@ class TestMirrorTopPerms(iotests.QMPTestCase):
4647
def tearDown(self):
4748
try:
4849
self.vm.shutdown()
49-
except qemu.machine.machine.AbnormalShutdown:
50+
except machine.AbnormalShutdown:
5051
pass
5152

5253
if self.vm_b is not None:
@@ -101,7 +102,7 @@ class TestMirrorTopPerms(iotests.QMPTestCase):
101102
self.vm_b.launch()
102103
print('ERROR: VM B launched successfully, this should not have '
103104
'happened')
104-
except qemu.qmp.QMPConnectError:
105+
except qmp.QMPConnectError:
105106
assert 'Is another process using the image' in self.vm_b.get_log()
106107

107108
result = self.vm.qmp('block-job-cancel',

0 commit comments

Comments
 (0)