@@ -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')
Signed-off-by: Max Reitz <mreitz@redhat.com> --- tests/qemu-iotests/256 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)