diff mbox series

[62/67] iotests/256: Honor $IMGOPTS

Message ID 20191001194715.2796-63-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:47 p.m. UTC
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/256 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/256 b/tests/qemu-iotests/256
index d2f9212e5a..7c78a123ad 100755
--- a/tests/qemu-iotests/256
+++ b/tests/qemu-iotests/256
@@ -21,13 +21,13 @@ 
 
 import os
 import iotests
-from iotests import log
+from iotests import log, create_test_image
 
 iotests.script_initialize(supported_fmts=['qcow2'])
 size = 64 * 1024 * 1024
 
-with iotests.FilePath('img0') as img0_path, \
-     iotests.FilePath('img1') as img1_path, \
+with iotests.ImagePath('img0') as img0_path, \
+     iotests.ImagePath('img1') as img1_path, \
      iotests.FilePath('img0-full') as img0_full_path, \
      iotests.FilePath('img1-full') as img1_full_path, \
      iotests.FilePath('img0-incr') as img0_incr_path, \
@@ -62,8 +62,8 @@  with iotests.FilePath('img0') as img0_path, \
     vm.add_object('iothread,id=iothread1')
     vm.add_device('virtio-scsi-pci,id=scsi0,iothread=iothread0')
     vm.add_device('virtio-scsi-pci,id=scsi1,iothread=iothread1')
-    iotests.qemu_img_create('-f', iotests.imgfmt, img0_path, str(size))
-    iotests.qemu_img_create('-f', iotests.imgfmt, img1_path, str(size))
+    create_test_image(img0_path, size)
+    create_test_image(img1_path, size)
     vm.add_drive(img0_path, interface='none')
     vm.add_device('scsi-hd,id=device0,drive=drive0,bus=scsi0.0')
     vm.add_drive(img1_path, interface='none')