[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/13] iotests/mirror-top-perms: Adjust imports
From: |
Kevin Wolf |
Subject: |
[PULL 11/13] iotests/mirror-top-perms: Adjust imports |
Date: |
Wed, 6 Oct 2021 12:59:21 +0200 |
From: John Snow <jsnow@redhat.com>
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>
---
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 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',
--
2.31.1
- [PULL 02/13] qemu-storage-daemon: Only display FUSE help when FUSE is built-in, (continued)
- [PULL 02/13] qemu-storage-daemon: Only display FUSE help when FUSE is built-in, Kevin Wolf, 2021/10/06
- [PULL 01/13] include/block.h: remove outdated comment, Kevin Wolf, 2021/10/06
- [PULL 03/13] block: implement bdrv_new_open_driver_opts(), Kevin Wolf, 2021/10/06
- [PULL 04/13] block: bdrv_insert_node(): fix and improve error handling, Kevin Wolf, 2021/10/06
- [PULL 05/13] block: bdrv_insert_node(): doc and style, Kevin Wolf, 2021/10/06
- [PULL 06/13] block: bdrv_insert_node(): don't use bdrv_open(), Kevin Wolf, 2021/10/06
- [PULL 07/13] iotests/image-fleecing: declare requirement of copy-before-write, Kevin Wolf, 2021/10/06
- [PULL 08/13] block: introduce max_hw_iov for use in scsi-generic, Kevin Wolf, 2021/10/06
- [PULL 10/13] iotests/linters: check mypy files all at once, Kevin Wolf, 2021/10/06
- [PULL 09/13] iotests: add 'qemu' package location to PYTHONPATH in testenv, Kevin Wolf, 2021/10/06
- [PULL 11/13] iotests/mirror-top-perms: Adjust imports,
Kevin Wolf <=
- [PULL 12/13] iotests/migrate-bitmaps-test: delint, Kevin Wolf, 2021/10/06
- [PULL 13/13] iotests: Update for pylint 2.11.1, Kevin Wolf, 2021/10/06
- Re: [PULL 00/13] Block layer patches, Richard Henderson, 2021/10/06