@@ -22,7 +22,7 @@
# Creator/Owner: John Snow <jsnow@redhat.com>
import iotests
-from iotests import log, qemu_img, qemu_io, qemu_io_silent
+from iotests import log, create_test_image, qemu_io, qemu_io_silent
iotests.script_initialize(supported_fmts=['qcow2', 'qcow', 'qed', 'vmdk',
'vhdx', 'raw'],
@@ -46,16 +46,16 @@ remainder = [("0xd5", "0x108000", "32k"), # Right-end of partial-left [1]
("0xdc", "32M", "32k"), # Left-end of partial-right [2]
("0xcd", "0x3ff0000", "64k")] # patterns[3]
-with iotests.FilePath('base.img') as base_img_path, \
- iotests.FilePath('fleece.img') as fleece_img_path, \
+with iotests.ImagePath('base.img') as base_img_path, \
+ iotests.ImagePath('fleece.img') as fleece_img_path, \
iotests.FilePath('nbd.sock') as nbd_sock_path, \
iotests.VM() as vm:
log('--- Setting up images ---')
log('')
- assert qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M') == 0
- assert qemu_img('create', '-f', "qcow2", fleece_img_path, '64M') == 0
+ assert create_test_image(base_img_path, '64M') == 0
+ assert create_test_image(fleece_img_path, '64M', fmt='qcow2') == 0
for p in patterns:
qemu_io('-f', iotests.imgfmt,
Signed-off-by: Max Reitz <mreitz@redhat.com> --- tests/qemu-iotests/222 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)