diff mbox series

[41/67] iotests/202: Honor $IMGOPTS

Message ID 20191001194715.2796-42-mreitz@redhat.com (mailing list archive)
State New, archived
Headers show
Series iotests: Honor $IMGOPTS in Python tests | expand

Commit Message

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

Patch

diff --git a/tests/qemu-iotests/202 b/tests/qemu-iotests/202
index 1271ac9459..f2a77fbe9b 100755
--- a/tests/qemu-iotests/202
+++ b/tests/qemu-iotests/202
@@ -23,18 +23,19 @@ 
 # against regressions.
 
 import iotests
+from iotests import create_test_image
 
 iotests.script_initialize(supported_fmts=['qcow2'])
 
-with iotests.FilePath('disk0.img') as disk0_img_path, \
-     iotests.FilePath('disk1.img') as disk1_img_path, \
+with iotests.ImagePath('disk0.img') as disk0_img_path, \
+     iotests.ImagePath('disk1.img') as disk1_img_path, \
      iotests.FilePath('disk0-snap.img') as disk0_snap_img_path, \
      iotests.FilePath('disk1-snap.img') as disk1_snap_img_path, \
      iotests.VM() as vm:
 
     img_size = '10M'
-    iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, disk0_img_path, img_size)
-    iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, disk1_img_path, img_size)
+    create_test_image(disk0_img_path, img_size)
+    create_test_image(disk1_img_path, img_size)
 
     iotests.log('Launching VM...')
     vm.launch()