[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] iotests/mirror-top-perms: Adjust imports
From: |
John Snow |
Subject: |
[PATCH 4/6] iotests/mirror-top-perms: Adjust imports |
Date: |
Wed, 22 Sep 2021 20:16:23 -0400 |
We need to import things from the qemu namespace; importing the
namespace alone doesn't bring the submodules 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>
---
tests/qemu-iotests/tests/mirror-top-perms | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/tests/mirror-top-perms
b/tests/qemu-iotests/tests/mirror-top-perms
index 73138a0ef91..3d475aa3a54 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',
--
2.31.1
- Re: [PATCH 2/6] iotests: add warning for rogue 'qemu' packages, (continued)
- [PATCH 3/6] iotests/linters: check mypy files all at once, John Snow, 2021/09/22
- [PATCH 1/6] iotests: add 'qemu' package location to PYTHONPATH in testenv, John Snow, 2021/09/22
- [PATCH 4/6] iotests/mirror-top-perms: Adjust imports,
John Snow <=
- [PATCH 5/6] iotests/migrate-bitmaps-test: delint, John Snow, 2021/09/22
- [PATCH 6/6] iotests: Update for pylint 2.11.1, John Snow, 2021/09/22
- Re: [PATCH 0/6] iotests: update environment and linting configuration, Kevin Wolf, 2021/09/23