summary refs log tree commit diff stats
path: root/tests/qemu-iotests/020
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qemu-iotests/020')
-rwxr-xr-xtests/qemu-iotests/02031
1 files changed, 18 insertions, 13 deletions
diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020
index 20f8f185d0..a0782937b0 100755
--- a/tests/qemu-iotests/020
+++ b/tests/qemu-iotests/020
@@ -70,7 +70,7 @@ echo "Creating test image with backing file"
 echo
 
 TEST_IMG="$TEST_IMG_SAVE"
-_make_test_img -b "$TEST_IMG.base" 6G
+_make_test_img -b "$TEST_IMG.base" -F $IMGFMT 6G
 
 echo "Filling test image"
 echo
@@ -115,18 +115,23 @@ TEST_IMG="$TEST_IMG.base" _make_test_img 1M
 # Create an image with a null backing file to which committing will fail (with
 # ENOSPC so we can distinguish the result from some generic EIO which may be
 # generated anywhere in the block layer)
-_make_test_img -b "json:{'driver': '$IMGFMT',
-                         'file': {
-                             'driver': 'blkdebug',
-                             'inject-error': [{
-                                 'event': 'write_aio',
-                                 'errno': 28,
-                                 'once': true
-                             }],
-                             'image': {
-                                 'driver': 'file',
-                                 'filename': '$TEST_IMG.base'
-                             }}}"
+backing="json:{'driver': '$IMGFMT',
+               'file': {
+                   'driver': 'blkdebug',
+                   'inject-error': [{
+                       'event': 'write_aio',
+                       'errno': 28,
+                       'once': true
+                   }],
+                   'image': {
+                       'driver': 'file',
+                       'filename': '$TEST_IMG.base'
+                   }}}"
+
+# Filter out newlines and collapse spaces
+backing=$(echo "$backing" | tr -d '\n' | tr -s ' ')
+
+_make_test_img -b "$backing" -F $IMGFMT
 
 # Just write anything so committing will not be a no-op
 $QEMU_IO -c 'writev 0 64k' "$TEST_IMG" | _filter_qemu_io