[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 34/67] iotests/155: Honor $IMGOPTS
From: |
Max Reitz |
Subject: |
[PATCH 34/67] iotests/155: Honor $IMGOPTS |
Date: |
Tue, 1 Oct 2019 21:46:42 +0200 |
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/155 | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/tests/qemu-iotests/155 b/tests/qemu-iotests/155
index e19485911c..4efe0e2237 100755
--- a/tests/qemu-iotests/155
+++ b/tests/qemu-iotests/155
@@ -23,7 +23,7 @@
import os
import iotests
-from iotests import qemu_img
+from iotests import create_test_image, remove_test_image
back0_img = os.path.join(iotests.test_dir, 'back0.' + iotests.imgfmt)
back1_img = os.path.join(iotests.test_dir, 'back1.' + iotests.imgfmt)
@@ -51,10 +51,10 @@ class BaseClass(iotests.QMPTestCase):
target_real_backing = None
def setUp(self):
- qemu_img('create', '-f', iotests.imgfmt, back0_img, '1440K')
- qemu_img('create', '-f', iotests.imgfmt, '-b', back0_img, back1_img)
- qemu_img('create', '-f', iotests.imgfmt, '-b', back1_img, back2_img)
- qemu_img('create', '-f', iotests.imgfmt, '-b', back2_img, source_img)
+ create_test_image(back0_img, '1440K')
+ create_test_image(back1_img, backing_file=back0_img)
+ create_test_image(back2_img, backing_file=back1_img)
+ create_test_image(source_img, backing_file=back2_img)
self.vm = iotests.VM()
# Add the BDS via blockdev-add so it stays around after the mirror
block
@@ -71,10 +71,10 @@ class BaseClass(iotests.QMPTestCase):
if self.existing:
if self.target_backing:
- qemu_img('create', '-f', iotests.imgfmt,
- '-b', self.target_backing, target_img, '1440K')
+ create_test_image(target_img, '1440K', \
+ backing_file=self.target_backing)
else:
- qemu_img('create', '-f', iotests.imgfmt, target_img, '1440K')
+ create_test_image(target_img, '1440K')
if self.cmd == 'blockdev-mirror':
options = { 'node-name': 'target',
@@ -89,14 +89,11 @@ class BaseClass(iotests.QMPTestCase):
def tearDown(self):
self.vm.shutdown()
- os.remove(source_img)
- os.remove(back2_img)
- os.remove(back1_img)
- os.remove(back0_img)
- try:
- os.remove(target_img)
- except OSError:
- pass
+ remove_test_image(source_img)
+ remove_test_image(back2_img)
+ remove_test_image(back1_img)
+ remove_test_image(back0_img)
+ remove_test_image(target_img)
def findBlockNode(self, node_name, qdev=None):
if qdev:
--
2.21.0
- [PATCH 24/67] iotests/096: Honor $IMGOPTS, (continued)
- [PATCH 24/67] iotests/096: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 25/67] iotests/118: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 28/67] iotests/132: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 26/67] iotests/124: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 27/67] iotests/129: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 29/67] iotests/139: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 30/67] iotests/147: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 32/67] iotests/151: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 31/67] iotests/148: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 33/67] iotests/152: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 34/67] iotests/155: Honor $IMGOPTS,
Max Reitz <=
- [PATCH 35/67] iotests/163: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 36/67] iotests/165: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 37/67] iotests/169: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 38/67] iotests/194: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 39/67] iotests/196: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 41/67] iotests/202: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 40/67] iotests/199: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 42/67] iotests/203: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 43/67] iotests/205: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 44/67] iotests/208: Honor $IMGOPTS, Max Reitz, 2019/10/01