[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 29/67] iotests/139: Honor $IMGOPTS
From: |
Max Reitz |
Subject: |
[PATCH 29/67] iotests/139: Honor $IMGOPTS |
Date: |
Tue, 1 Oct 2019 21:46:37 +0200 |
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/139 | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/tests/qemu-iotests/139 b/tests/qemu-iotests/139
index cbb5a76530..f4cb553116 100755
--- a/tests/qemu-iotests/139
+++ b/tests/qemu-iotests/139
@@ -21,6 +21,7 @@
import os
import iotests
+from iotests import create_test_image, remove_test_image
import time
base_img = os.path.join(iotests.test_dir, 'base.img')
@@ -33,7 +34,7 @@ else:
class TestBlockdevDel(iotests.QMPTestCase):
def setUp(self):
- iotests.qemu_img('create', '-f', iotests.imgfmt, base_img, '1M')
+ create_test_image(base_img, '1M')
self.vm = iotests.VM()
self.vm.add_device("{},id=virtio-scsi".format(
iotests.get_virtio_scsi_device()))
@@ -41,9 +42,8 @@ class TestBlockdevDel(iotests.QMPTestCase):
def tearDown(self):
self.vm.shutdown()
- os.remove(base_img)
- if os.path.isfile(new_img):
- os.remove(new_img)
+ remove_test_image(base_img)
+ remove_test_image(new_img)
# Check whether a BlockDriverState exists
def checkBlockDriverState(self, node, must_exist = True):
@@ -70,8 +70,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
# Add a BlockDriverState that will be used as overlay for the base_img BDS
def addBlockDriverStateOverlay(self, node):
self.checkBlockDriverState(node, False)
- iotests.qemu_img('create', '-u', '-f', iotests.imgfmt,
- '-b', base_img, new_img, '1M')
+ create_test_image(new_img, '1M', backing_file=base_img, unsafe=True)
opts = {'driver': iotests.imgfmt,
'node-name': node,
'backing': None,
@@ -202,7 +201,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
self.checkBlockDriverState(test, False)
self.checkBlockDriverState(raw, False)
self.checkBlockDriverState(blkverify, False)
- iotests.qemu_img('create', '-f', iotests.imgfmt, new_img, '1M')
+ create_test_image(new_img, '1M')
node_0 = {'driver': iotests.imgfmt,
'node-name': test,
'file': {'driver': 'file',
@@ -226,7 +225,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
self.checkBlockDriverState(child0, False)
self.checkBlockDriverState(child1, False)
self.checkBlockDriverState(quorum, False)
- iotests.qemu_img('create', '-f', iotests.imgfmt, new_img, '1M')
+ create_test_image(new_img, '1M')
child_0 = {'driver': iotests.imgfmt,
'node-name': child0,
'file': {'driver': 'file',
--
2.21.0
- [PATCH 19/67] iotests/045: Honor $IMGOPTS, (continued)
- [PATCH 19/67] iotests/045: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 21/67] iotests/056: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 22/67] iotests/057: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 23/67] iotests/065: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 20/67] iotests/055: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [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 <=
- [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, 2019/10/01
- [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