@@ -22,7 +22,7 @@
import math
import iotests
-from iotests import imgfmt
+from iotests import imgfmt, create_test_image
iotests.script_initialize(supported_fmts=['vmdk'],
# All options are ignored
@@ -38,9 +38,9 @@ def blockdev_create(vm, options):
iotests.log("")
with iotests.FilePath('t.vmdk') as disk_path, \
- iotests.FilePath('t.vmdk.1') as extent1_path, \
- iotests.FilePath('t.vmdk.2') as extent2_path, \
- iotests.FilePath('t.vmdk.3') as extent3_path, \
+ iotests.ImagePath('t.vmdk.1') as extent1_path, \
+ iotests.ImagePath('t.vmdk.2') as extent2_path, \
+ iotests.ImagePath('t.vmdk.3') as extent3_path, \
iotests.VM() as vm:
#
@@ -175,8 +175,7 @@ with iotests.FilePath('t.vmdk') as disk_path, \
iotests.log("")
for path in [ extent1_path, extent2_path, extent3_path ]:
- msg = iotests.qemu_img_pipe('create', '-f', imgfmt, path, '0')
- iotests.log(msg, [iotests.filter_testfiles])
+ assert create_test_image(path, 0) == 0
vm.add_blockdev('driver=file,filename=%s,node-name=ext1' % (extent1_path))
vm.add_blockdev('driver=file,filename=%s,node-name=ext2' % (extent2_path))
@@ -129,12 +129,6 @@ Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exi
=== Other subformats ===
-Formatting 'TEST_DIR/PID-t.vmdk.1', fmt=vmdk size=0 compat6=off hwversion=undefined
-
-Formatting 'TEST_DIR/PID-t.vmdk.2', fmt=vmdk size=0 compat6=off hwversion=undefined
-
-Formatting 'TEST_DIR/PID-t.vmdk.3', fmt=vmdk size=0 compat6=off hwversion=undefined
-
== Missing extent ==
{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "file": "node0", "size": 33554432, "subformat": "monolithicFlat"}}}
Signed-off-by: Max Reitz <mreitz@redhat.com> --- tests/qemu-iotests/237 | 11 +++++------ tests/qemu-iotests/237.out | 6 ------ 2 files changed, 5 insertions(+), 12 deletions(-)