diff mbox series

[53/67] iotests/235: Honor $IMGOPTS

Message ID 20191001194715.2796-54-mreitz@redhat.com
State New
Headers show
Series iotests: Honor $IMGOPTS in Python tests | expand

Commit Message

Max Reitz Oct. 1, 2019, 7:47 p.m. UTC
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/235 | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235
index 9e88c65b93..3326d205b7 100755
--- a/tests/qemu-iotests/235
+++ b/tests/qemu-iotests/235
@@ -21,7 +21,7 @@ 
 import sys
 import os
 import iotests
-from iotests import qemu_img_create, qemu_io, file_path, log
+from iotests import create_test_image, qemu_io, image_path, log
 
 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
 
@@ -42,11 +42,10 @@  iotests.script_initialize(supported_fmts=['qcow2'])
 
 size = 1 * 1024 * 1024 * 1024
 
-disk = file_path('disk')
+disk = image_path('disk')
 
 # prepare source image
-qemu_img_create('-f', iotests.imgfmt, '-o', 'preallocation=metadata', disk,
-                str(size))
+create_test_image(disk, size, opts=['preallocation=metadata'])
 
 vm = QEMUMachine(iotests.qemu_prog)
 vm.add_args('-machine', 'accel=kvm:tcg')