[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 51/67] iotests/228: Honor $IMGOPTS
From: |
Max Reitz |
Subject: |
[PATCH 51/67] iotests/228: Honor $IMGOPTS |
Date: |
Tue, 1 Oct 2019 21:46:59 +0200 |
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/228 | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/tests/qemu-iotests/228 b/tests/qemu-iotests/228
index e507db4f27..ad7966fc8f 100755
--- a/tests/qemu-iotests/228
+++ b/tests/qemu-iotests/228
@@ -21,8 +21,9 @@
# Creator/Owner: Max Reitz <address@hidden>
import iotests
-from iotests import log, qemu_img, filter_testfiles, filter_imgfmt, \
- filter_qmp_testfiles, filter_qmp_imgfmt, filter_json_filename
+from iotests import log, create_test_image, remove_test_image, \
+ filter_testfiles, filter_imgfmt, filter_qmp_testfiles, \
+ filter_qmp_imgfmt, filter_json_filename
# Need backing file and change-backing-file support
iotests.script_initialize(supported_fmts=['qcow2', 'qed'])
@@ -46,14 +47,14 @@ def log_node_info(node):
log('')
-with iotests.FilePath('base.img') as base_img_path, \
- iotests.FilePath('top.img') as top_img_path, \
+with iotests.ImagePath('base.img') as base_img_path, \
+ iotests.ImagePath('top.img') as top_img_path, \
iotests.VM() as vm:
- assert qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M') == 0
+ assert create_test_image(base_img_path, '64M') == 0
# Choose a funny way to describe the backing filename
- assert qemu_img('create', '-f', iotests.imgfmt, '-b',
- 'file:' + base_img_path, top_img_path) == 0
+ assert create_test_image(top_img_path,
+ backing_file=('file:' + base_img_path)) == 0
vm.launch()
@@ -167,8 +168,8 @@ with iotests.FilePath('base.img') as base_img_path, \
# (because qemu cannot "canonicalize"/"resolve" the backing
# filename unless the backing file is opened implicitly with the
# overlay)
- assert qemu_img('create', '-f', iotests.imgfmt, '-b', base_img_path,
- top_img_path) == 0
+ remove_test_image(top_img_path)
+ assert create_test_image(top_img_path, backing_file=base_img_path) == 0
# You can only reliably override backing options by using a node
# reference (or by specifying file.filename, but, well...)
--
2.21.0
- [PATCH 40/67] iotests/199: Honor $IMGOPTS, (continued)
- [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
- [PATCH 45/67] iotests/208: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 46/67] iotests/216: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 47/67] iotests/218: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 48/67] iotests/219: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 49/67] iotests/222: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 50/67] iotests/224: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 51/67] iotests/228: Honor $IMGOPTS,
Max Reitz <=
- [PATCH 52/67] iotests/234: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 53/67] iotests/235: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 54/67] iotests/236: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 55/67] iotests/237: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 56/67] iotests/242: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 57/67] iotests/245: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 59/67] iotests/248: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 58/67] iotests/246: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 60/67] iotests/254: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 61/67] iotests/255: Honor $IMGOPTS, Max Reitz, 2019/10/01