Blame 0001-iotests-Fix-_send_qemu_cmd-with-bash-5.1.patch

Paolo Bonzini d1c454
From 0e72078128229bf9efb542e396ab44bf91b91340 Mon Sep 17 00:00:00 2001
Paolo Bonzini d1c454
From: Max Reitz <mreitz@redhat.com>
Paolo Bonzini d1c454
Date: Thu, 17 Dec 2020 16:38:03 +0100
Paolo Bonzini d1c454
Subject: [PATCH] iotests: Fix _send_qemu_cmd with bash 5.1
Paolo Bonzini d1c454
Paolo Bonzini d1c454
With bash 5.1, the output of the following script changes:
Paolo Bonzini d1c454
Paolo Bonzini d1c454
  a=("double  space")
Paolo Bonzini d1c454
  a=${a[@]:0:1}
Paolo Bonzini d1c454
  echo "$a"
Paolo Bonzini d1c454
Paolo Bonzini d1c454
from "double space" to "double  space", i.e. all white space is
Paolo Bonzini d1c454
preserved as-is.  This is probably what we actually want here (judging
Paolo Bonzini d1c454
from the "...to accommodate pathnames with spaces" comment), but before
Paolo Bonzini d1c454
5.1, we would have to quote the ${} slice to get the same behavior.
Paolo Bonzini d1c454
Paolo Bonzini d1c454
In any case, without quoting, the reference output of many iotests is
Paolo Bonzini d1c454
different between bash 5.1 and pre-5.1, which is not very good.  The
Paolo Bonzini d1c454
output of 5.1 is what we want, so whatever we do to get pre-5.1 to the
Paolo Bonzini d1c454
same result, it means we have to fix the reference output of basically
Paolo Bonzini d1c454
all tests that invoke _send_qemu_cmd (except the ones that only use
Paolo Bonzini d1c454
single spaces in the commands they invoke).
Paolo Bonzini d1c454
Paolo Bonzini d1c454
Instead of quoting the ${} slice (cmd="${$@: 1:...}"), we can also just
Paolo Bonzini d1c454
not use array slicing and replace the whole thing with a simple "cmd=$1;
Paolo Bonzini d1c454
shift", which works because all callers quote the whole $cmd argument
Paolo Bonzini d1c454
anyway.
Paolo Bonzini d1c454
Paolo Bonzini d1c454
Signed-off-by: Max Reitz <mreitz@redhat.com>
Paolo Bonzini d1c454
Message-Id: <20201217153803.101231-3-mreitz@redhat.com>
Paolo Bonzini d1c454
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Paolo Bonzini d1c454
---
Paolo Bonzini d1c454
 tests/qemu-iotests/085.out     | 167 ++++++++++++++++++++++++++++-----
Paolo Bonzini d1c454
 tests/qemu-iotests/094.out     |  10 +-
Paolo Bonzini d1c454
 tests/qemu-iotests/095.out     |   4 +-
Paolo Bonzini d1c454
 tests/qemu-iotests/109.out     |  88 ++++++++++++-----
Paolo Bonzini d1c454
 tests/qemu-iotests/117.out     |  13 ++-
Paolo Bonzini d1c454
 tests/qemu-iotests/127.out     |  12 ++-
Paolo Bonzini d1c454
 tests/qemu-iotests/140.out     |  10 +-
Paolo Bonzini d1c454
 tests/qemu-iotests/141.out     | 128 +++++++++++++++++++------
Paolo Bonzini d1c454
 tests/qemu-iotests/143.out     |   4 +-
Paolo Bonzini d1c454
 tests/qemu-iotests/144.out     |  28 +++++-
Paolo Bonzini d1c454
 tests/qemu-iotests/153.out     |  18 ++--
Paolo Bonzini d1c454
 tests/qemu-iotests/156.out     |  39 ++++++--
Paolo Bonzini d1c454
 tests/qemu-iotests/161.out     |  18 +++-
Paolo Bonzini d1c454
 tests/qemu-iotests/173.out     |  25 ++++-
Paolo Bonzini d1c454
 tests/qemu-iotests/182.out     |  42 +++++++--
Paolo Bonzini d1c454
 tests/qemu-iotests/183.out     |  19 +++-
Paolo Bonzini d1c454
 tests/qemu-iotests/185.out     |  45 +++++++--
Paolo Bonzini d1c454
 tests/qemu-iotests/191.out     |  12 ++-
Paolo Bonzini d1c454
 tests/qemu-iotests/223.out     |  92 ++++++++++++------
Paolo Bonzini d1c454
 tests/qemu-iotests/229.out     |  13 ++-
Paolo Bonzini d1c454
 tests/qemu-iotests/249.out     |  16 +++-
Paolo Bonzini d1c454
 tests/qemu-iotests/common.qemu |  11 +--
Paolo Bonzini d1c454
 24 files changed, 728 insertions(+), 199 deletions(-)
Paolo Bonzini d1c454
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/085.out b/tests/qemu-iotests/085.out
Paolo Bonzini d1c454
index 7fc44b1c61..32a193f2c2 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/085.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/085.out
Paolo Bonzini d1c454
@@ -12,56 +12,135 @@ Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=134217728
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Create a single snapshot on virtio0 ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0', 'snapshot-file':'TEST_DIR/1-snapshot-v0.IMGFMT', 'format': 'IMGFMT' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot-sync',
Paolo Bonzini d1c454
+                      'arguments': { 'device': 'virtio0',
Paolo Bonzini d1c454
+                                     'snapshot-file':'TEST_DIR/1-snapshot-v0.IMGFMT',
Paolo Bonzini d1c454
+                                     'format': 'IMGFMT' } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/1-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/t.qcow2.1 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Invalid command - missing device and nodename ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'snapshot-file':'TEST_DIR/1-snapshot-v0.IMGFMT', 'format': 'IMGFMT' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot-sync',
Paolo Bonzini d1c454
+                         'arguments': { 'snapshot-file':'TEST_DIR/1-snapshot-v0.IMGFMT',
Paolo Bonzini d1c454
+                                     'format': 'IMGFMT' } }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Cannot find device= nor node_name="}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Invalid command - missing snapshot-file ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0', 'format': 'IMGFMT' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot-sync',
Paolo Bonzini d1c454
+                         'arguments': { 'device': 'virtio0',
Paolo Bonzini d1c454
+                                     'format': 'IMGFMT' } }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Parameter 'snapshot-file' is missing"}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Create several transactional group snapshots ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/2-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/2-snapshot-v1.IMGFMT' } } ] } }
Paolo Bonzini d1c454
+{ 'execute': 'transaction', 'arguments':
Paolo Bonzini d1c454
+           {'actions': [
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio0',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/2-snapshot-v0.IMGFMT' } },
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio1',
Paolo Bonzini d1c454
+                       'snapshot-file': 'TEST_DIR/2-snapshot-v1.IMGFMT' } } ]
Paolo Bonzini d1c454
+             } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/2-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/1-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/2-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/t.qcow2.2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/3-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/3-snapshot-v1.IMGFMT' } } ] } }
Paolo Bonzini d1c454
+{ 'execute': 'transaction', 'arguments':
Paolo Bonzini d1c454
+           {'actions': [
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio0',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/3-snapshot-v0.IMGFMT' } },
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio1',
Paolo Bonzini d1c454
+                       'snapshot-file': 'TEST_DIR/3-snapshot-v1.IMGFMT' } } ]
Paolo Bonzini d1c454
+             } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/3-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/2-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/3-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/2-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/4-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/4-snapshot-v1.IMGFMT' } } ] } }
Paolo Bonzini d1c454
+{ 'execute': 'transaction', 'arguments':
Paolo Bonzini d1c454
+           {'actions': [
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio0',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/4-snapshot-v0.IMGFMT' } },
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio1',
Paolo Bonzini d1c454
+                       'snapshot-file': 'TEST_DIR/4-snapshot-v1.IMGFMT' } } ]
Paolo Bonzini d1c454
+             } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/4-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/3-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/4-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/3-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/5-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/5-snapshot-v1.IMGFMT' } } ] } }
Paolo Bonzini d1c454
+{ 'execute': 'transaction', 'arguments':
Paolo Bonzini d1c454
+           {'actions': [
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio0',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/5-snapshot-v0.IMGFMT' } },
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio1',
Paolo Bonzini d1c454
+                       'snapshot-file': 'TEST_DIR/5-snapshot-v1.IMGFMT' } } ]
Paolo Bonzini d1c454
+             } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/5-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/4-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/5-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/4-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/6-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/6-snapshot-v1.IMGFMT' } } ] } }
Paolo Bonzini d1c454
+{ 'execute': 'transaction', 'arguments':
Paolo Bonzini d1c454
+           {'actions': [
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio0',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/6-snapshot-v0.IMGFMT' } },
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio1',
Paolo Bonzini d1c454
+                       'snapshot-file': 'TEST_DIR/6-snapshot-v1.IMGFMT' } } ]
Paolo Bonzini d1c454
+             } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/6-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/5-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/6-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/5-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/7-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/7-snapshot-v1.IMGFMT' } } ] } }
Paolo Bonzini d1c454
+{ 'execute': 'transaction', 'arguments':
Paolo Bonzini d1c454
+           {'actions': [
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio0',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/7-snapshot-v0.IMGFMT' } },
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio1',
Paolo Bonzini d1c454
+                       'snapshot-file': 'TEST_DIR/7-snapshot-v1.IMGFMT' } } ]
Paolo Bonzini d1c454
+             } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/7-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/6-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/7-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/6-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/8-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/8-snapshot-v1.IMGFMT' } } ] } }
Paolo Bonzini d1c454
+{ 'execute': 'transaction', 'arguments':
Paolo Bonzini d1c454
+           {'actions': [
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio0',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/8-snapshot-v0.IMGFMT' } },
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio1',
Paolo Bonzini d1c454
+                       'snapshot-file': 'TEST_DIR/8-snapshot-v1.IMGFMT' } } ]
Paolo Bonzini d1c454
+             } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/8-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/7-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/8-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/7-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/9-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/9-snapshot-v1.IMGFMT' } } ] } }
Paolo Bonzini d1c454
+{ 'execute': 'transaction', 'arguments':
Paolo Bonzini d1c454
+           {'actions': [
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio0',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/9-snapshot-v0.IMGFMT' } },
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio1',
Paolo Bonzini d1c454
+                       'snapshot-file': 'TEST_DIR/9-snapshot-v1.IMGFMT' } } ]
Paolo Bonzini d1c454
+             } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/9-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/8-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/9-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/8-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'transaction', 'arguments': {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': 'TEST_DIR/10-snapshot-v0.IMGFMT' } }, { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio1', 'snapshot-file': 'TEST_DIR/10-snapshot-v1.IMGFMT' } } ] } }
Paolo Bonzini d1c454
+{ 'execute': 'transaction', 'arguments':
Paolo Bonzini d1c454
+           {'actions': [
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio0',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/10-snapshot-v0.IMGFMT' } },
Paolo Bonzini d1c454
+               { 'type': 'blockdev-snapshot-sync', 'data' :
Paolo Bonzini d1c454
+                   { 'device': 'virtio1',
Paolo Bonzini d1c454
+                       'snapshot-file': 'TEST_DIR/10-snapshot-v1.IMGFMT' } } ]
Paolo Bonzini d1c454
+             } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/10-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/9-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/10-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/9-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -69,48 +148,84 @@ Formatting 'TEST_DIR/10-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extende
Paolo Bonzini d1c454
 === Create a couple of snapshots using blockdev-snapshot ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/11-snapshot-v0.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/10-snapshot-v0.IMGFMT backing_fmt=IMGFMT
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'IMGFMT', 'node-name': 'snap_11', 'backing': null, 'file': { 'driver': 'file', 'filename': 'TEST_DIR/11-snapshot-v0.IMGFMT', 'node-name': 'file_11' } } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-add', 'arguments':
Paolo Bonzini d1c454
+           { 'driver': 'IMGFMT', 'node-name': 'snap_11', 'backing': null,
Paolo Bonzini d1c454
+             'file':
Paolo Bonzini d1c454
+             { 'driver': 'file', 'filename': 'TEST_DIR/11-snapshot-v0.IMGFMT',
Paolo Bonzini d1c454
+               'node-name': 'file_11' } } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_11' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                      'arguments': { 'node': 'virtio0',
Paolo Bonzini d1c454
+                                     'overlay':'snap_11' } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/12-snapshot-v0.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/11-snapshot-v0.IMGFMT backing_fmt=IMGFMT
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'IMGFMT', 'node-name': 'snap_12', 'backing': null, 'file': { 'driver': 'file', 'filename': 'TEST_DIR/12-snapshot-v0.IMGFMT', 'node-name': 'file_12' } } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-add', 'arguments':
Paolo Bonzini d1c454
+           { 'driver': 'IMGFMT', 'node-name': 'snap_12', 'backing': null,
Paolo Bonzini d1c454
+             'file':
Paolo Bonzini d1c454
+             { 'driver': 'file', 'filename': 'TEST_DIR/12-snapshot-v0.IMGFMT',
Paolo Bonzini d1c454
+               'node-name': 'file_12' } } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_12' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                      'arguments': { 'node': 'virtio0',
Paolo Bonzini d1c454
+                                     'overlay':'snap_12' } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Invalid command - cannot create a snapshot using a file BDS ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'virtio0', 'overlay':'file_12' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                     'arguments': { 'node':'virtio0',
Paolo Bonzini d1c454
+                                    'overlay':'file_12' }
Paolo Bonzini d1c454
+                   }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "The overlay is already in use"}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Invalid command - snapshot node used as active layer ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_12' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                      'arguments': { 'node': 'virtio0',
Paolo Bonzini d1c454
+                                     'overlay':'snap_12' } }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "The overlay is already in use"}}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'virtio0', 'overlay':'virtio0' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                     'arguments': { 'node':'virtio0',
Paolo Bonzini d1c454
+                                    'overlay':'virtio0' }
Paolo Bonzini d1c454
+                   }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "The overlay is already in use"}}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'virtio0', 'overlay':'virtio1' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                     'arguments': { 'node':'virtio0',
Paolo Bonzini d1c454
+                                    'overlay':'virtio1' }
Paolo Bonzini d1c454
+                   }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "The overlay is already in use"}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Invalid command - snapshot node used as backing hd ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_11' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                      'arguments': { 'node': 'virtio0',
Paolo Bonzini d1c454
+                                     'overlay':'snap_11' } }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "The overlay is already in use"}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Invalid command - snapshot node has a backing image ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-add', 'arguments': { 'driver': 'IMGFMT', 'node-name': 'snap_13', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT', 'node-name': 'file_13' } } }
Paolo Bonzini d1c454
-{"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_13' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-add', 'arguments':
Paolo Bonzini d1c454
+           { 'driver': 'IMGFMT', 'node-name': 'snap_13',
Paolo Bonzini d1c454
+             'file':
Paolo Bonzini d1c454
+             { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+               'node-name': 'file_13' } } }
Paolo Bonzini d1c454
+{"return": {}}
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                      'arguments': { 'node': 'virtio0',
Paolo Bonzini d1c454
+                                     'overlay':'snap_13' } }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "The overlay already has a backing image"}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Invalid command - The node does not exist ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay':'snap_14' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                      'arguments': { 'node': 'virtio0',
Paolo Bonzini d1c454
+                                     'overlay':'snap_14' } }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Cannot find device=snap_14 nor node_name=snap_14"}}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot', 'arguments': { 'node':'nodevice', 'overlay':'snap_13' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot',
Paolo Bonzini d1c454
+                     'arguments': { 'node':'nodevice',
Paolo Bonzini d1c454
+                                    'overlay':'snap_13' }
Paolo Bonzini d1c454
+                   }
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Cannot find device=nodevice nor node_name=nodevice"}}
Paolo Bonzini d1c454
 *** done
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/094.out b/tests/qemu-iotests/094.out
Paolo Bonzini d1c454
index 9b6c57b3e2..97f894cf8f 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/094.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/094.out
Paolo Bonzini d1c454
@@ -3,13 +3,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/source.IMGFMT', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 {'execute': 'qmp_capabilities'}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute': 'drive-mirror', 'arguments': {'device': 'src', 'target': 'nbd+unix:///?socket=SOCK_DIR/nbd', 'format': 'nbd', 'sync':'full', 'mode':'existing'}}
Paolo Bonzini d1c454
+{'execute': 'drive-mirror',
Paolo Bonzini d1c454
+      'arguments': {'device': 'src',
Paolo Bonzini d1c454
+                    'target': 'nbd+unix:///?socket=SOCK_DIR/nbd',
Paolo Bonzini d1c454
+                    'format': 'nbd',
Paolo Bonzini d1c454
+                    'sync':'full',
Paolo Bonzini d1c454
+                    'mode':'existing'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 67108864, "offset": 67108864, "speed": 0, "type": "mirror"}}
Paolo Bonzini d1c454
-{'execute': 'block-job-complete', 'arguments': {'device': 'src'}}
Paolo Bonzini d1c454
+{'execute': 'block-job-complete',
Paolo Bonzini d1c454
+      'arguments': {'device': 'src'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/095.out b/tests/qemu-iotests/095.out
Paolo Bonzini d1c454
index e66ced58f8..8257c5e1e6 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/095.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/095.out
Paolo Bonzini d1c454
@@ -12,7 +12,9 @@ virtual size: 5 MiB (5242880 bytes)
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'block-commit', 'arguments': { 'device': 'test', 'top': 'TEST_DIR/t.IMGFMT.snp1' } }
Paolo Bonzini d1c454
+{ 'execute': 'block-commit',
Paolo Bonzini d1c454
+                                 'arguments': { 'device': 'test',
Paolo Bonzini d1c454
+                                 'top': 'TEST_DIR/t.IMGFMT.snp1' } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "test"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "test"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/109.out b/tests/qemu-iotests/109.out
Paolo Bonzini d1c454
index ad739df46c..6e73406cdb 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/109.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/109.out
Paolo Bonzini d1c454
@@ -6,7 +6,9 @@ Formatting 'TEST_DIR/t.raw.src', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -27,7 +29,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -51,7 +55,9 @@ Formatting 'TEST_DIR/t.raw.src', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -72,7 +78,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -96,7 +104,9 @@ Formatting 'TEST_DIR/t.raw.src', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -117,7 +127,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -141,7 +153,9 @@ Formatting 'TEST_DIR/t.raw.src', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -162,7 +176,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -186,7 +202,9 @@ Formatting 'TEST_DIR/t.raw.src', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -207,7 +225,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -231,7 +251,9 @@ Formatting 'TEST_DIR/t.raw.src', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -252,7 +274,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -275,7 +299,9 @@ Images are identical.
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -296,7 +322,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -319,7 +347,9 @@ Images are identical.
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -340,7 +370,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -363,7 +395,9 @@ Images are identical.
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -384,7 +418,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -407,7 +443,9 @@ Images are identical.
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -428,7 +466,9 @@ read 512/512 bytes at offset 0
Paolo Bonzini d1c454
 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -451,7 +491,9 @@ Images are identical.
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
Paolo Bonzini d1c454
          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Paolo Bonzini d1c454
          Specify the 'raw' format explicitly to remove the restrictions.
Paolo Bonzini d1c454
@@ -473,7 +515,9 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
Paolo Bonzini d1c454
 Images are identical.
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
+{'execute':'drive-mirror', 'arguments':{
Paolo Bonzini d1c454
+            'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT',
Paolo Bonzini d1c454
+            'mode': 'existing', 'sync': 'full'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/117.out b/tests/qemu-iotests/117.out
Paolo Bonzini d1c454
index bb623dcc0a..735ffd25c6 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/117.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/117.out
Paolo Bonzini d1c454
@@ -2,11 +2,18 @@ QA output created by 117
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=65536
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-add', 'arguments': { 'node-name': 'protocol', 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-add',
Paolo Bonzini d1c454
+       'arguments': { 'node-name': 'protocol',
Paolo Bonzini d1c454
+                      'driver': 'file',
Paolo Bonzini d1c454
+                      'filename': 'TEST_DIR/t.IMGFMT' } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-add', 'arguments': { 'node-name': 'format', 'driver': 'IMGFMT', 'file': 'protocol' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-add',
Paolo Bonzini d1c454
+       'arguments': { 'node-name': 'format',
Paolo Bonzini d1c454
+                      'driver': 'IMGFMT',
Paolo Bonzini d1c454
+                      'file': 'protocol' } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io format "write -P 42 0 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line': 'qemu-io format "write -P 42 0 64k"' } }
Paolo Bonzini d1c454
 wrote 65536/65536 bytes at offset 0
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/127.out b/tests/qemu-iotests/127.out
Paolo Bonzini d1c454
index efd6cb327f..1685c4850a 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/127.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/127.out
Paolo Bonzini d1c454
@@ -6,13 +6,21 @@ wrote 42/42 bytes at offset 0
Paolo Bonzini d1c454
 42 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'drive-mirror', 'arguments': { 'job-id': 'mirror', 'device': 'source', 'target': 'TEST_DIR/t.IMGFMT.overlay1', 'mode': 'existing', 'sync': 'top' } }
Paolo Bonzini d1c454
+{ 'execute': 'drive-mirror',
Paolo Bonzini d1c454
+       'arguments': {
Paolo Bonzini d1c454
+           'job-id': 'mirror',
Paolo Bonzini d1c454
+           'device': 'source',
Paolo Bonzini d1c454
+           'target': 'TEST_DIR/t.IMGFMT.overlay1',
Paolo Bonzini d1c454
+           'mode':   'existing',
Paolo Bonzini d1c454
+           'sync':   'top'
Paolo Bonzini d1c454
+       } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "mirror"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "mirror"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "mirror"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "mirror", "len": 65536, "offset": 65536, "speed": 0, "type": "mirror"}}
Paolo Bonzini d1c454
-{ 'execute': 'block-job-complete', 'arguments': { 'device': 'mirror' } }
Paolo Bonzini d1c454
+{ 'execute': 'block-job-complete',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'mirror' } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "mirror"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "mirror"}}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/140.out b/tests/qemu-iotests/140.out
Paolo Bonzini d1c454
index 62d9c3ab3c..312f76d5da 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/140.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/140.out
Paolo Bonzini d1c454
@@ -4,13 +4,17 @@ wrote 65536/65536 bytes at offset 0
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'nbd-server-start', 'arguments': { 'addr': { 'type': 'unix', 'data': { 'path': 'SOCK_DIR/nbd' }}}}
Paolo Bonzini d1c454
+{ 'execute': 'nbd-server-start',
Paolo Bonzini d1c454
+       'arguments': { 'addr': { 'type': 'unix',
Paolo Bonzini d1c454
+                                'data': { 'path': 'SOCK_DIR/nbd' }}}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'nbd-server-add', 'arguments': { 'device': 'drv' }}
Paolo Bonzini d1c454
+{ 'execute': 'nbd-server-add',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'drv' }}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 read 65536/65536 bytes at offset 0
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
-{ 'execute': 'eject', 'arguments': { 'device': 'drv' }}
Paolo Bonzini d1c454
+{ 'execute': 'eject',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'drv' }}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "drv"}}
Paolo Bonzini d1c454
 qemu-io: can't open device nbd+unix:///drv?socket=SOCK_DIR/nbd: Requested export not available
Paolo Bonzini d1c454
 server reported: export 'drv' not present
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/141.out b/tests/qemu-iotests/141.out
Paolo Bonzini d1c454
index 08e0aecd65..6d8652e22b 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/141.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/141.out
Paolo Bonzini d1c454
@@ -7,105 +7,173 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/m.
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Testing drive-backup ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': 'IMGFMT', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT' }}}
Paolo Bonzini d1c454
-{"return": {}}
Paolo Bonzini d1c454
-{'execute': 'drive-backup', 'arguments': {'job-id': 'job0', 'device': 'drv0', 'target': 'TEST_DIR/o.IMGFMT', 'format': 'IMGFMT', 'sync': 'none'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-add',
Paolo Bonzini d1c454
+          'arguments': {
Paolo Bonzini d1c454
+              'node-name': 'drv0',
Paolo Bonzini d1c454
+              'driver': 'IMGFMT',
Paolo Bonzini d1c454
+              'file': {
Paolo Bonzini d1c454
+                  'driver': 'file',
Paolo Bonzini d1c454
+                  'filename': 'TEST_DIR/t.IMGFMT'
Paolo Bonzini d1c454
+              }}}
Paolo Bonzini d1c454
+{"return": {}}
Paolo Bonzini d1c454
+{'execute': 'drive-backup',
Paolo Bonzini d1c454
+'arguments': {'job-id': 'job0',
Paolo Bonzini d1c454
+'device': 'drv0',
Paolo Bonzini d1c454
+'target': 'TEST_DIR/o.IMGFMT',
Paolo Bonzini d1c454
+'format': 'IMGFMT',
Paolo Bonzini d1c454
+'sync': 'none'}}
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/o.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.IMGFMT backing_fmt=IMGFMT
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: node is used as backing hd of 'NODE_NAME'"}}
Paolo Bonzini d1c454
-{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
+{'execute': 'block-job-cancel',
Paolo Bonzini d1c454
+          'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset": 0, "speed": 0, "type": "backup"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Testing drive-mirror ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': 'IMGFMT', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT' }}}
Paolo Bonzini d1c454
-{"return": {}}
Paolo Bonzini d1c454
-{'execute': 'drive-mirror', 'arguments': {'job-id': 'job0', 'device': 'drv0', 'target': 'TEST_DIR/o.IMGFMT', 'format': 'IMGFMT', 'sync': 'none'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-add',
Paolo Bonzini d1c454
+          'arguments': {
Paolo Bonzini d1c454
+              'node-name': 'drv0',
Paolo Bonzini d1c454
+              'driver': 'IMGFMT',
Paolo Bonzini d1c454
+              'file': {
Paolo Bonzini d1c454
+                  'driver': 'file',
Paolo Bonzini d1c454
+                  'filename': 'TEST_DIR/t.IMGFMT'
Paolo Bonzini d1c454
+              }}}
Paolo Bonzini d1c454
+{"return": {}}
Paolo Bonzini d1c454
+{'execute': 'drive-mirror',
Paolo Bonzini d1c454
+'arguments': {'job-id': 'job0',
Paolo Bonzini d1c454
+'device': 'drv0',
Paolo Bonzini d1c454
+'target': 'TEST_DIR/o.IMGFMT',
Paolo Bonzini d1c454
+'format': 'IMGFMT',
Paolo Bonzini d1c454
+'sync': 'none'}}
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/o.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.IMGFMT backing_fmt=IMGFMT
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: mirror"}}
Paolo Bonzini d1c454
-{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
+{'execute': 'block-job-cancel',
Paolo Bonzini d1c454
+          'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Testing active block-commit ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': 'IMGFMT', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT' }}}
Paolo Bonzini d1c454
-{"return": {}}
Paolo Bonzini d1c454
-{'execute': 'block-commit', 'arguments': {'job-id': 'job0', 'device': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-add',
Paolo Bonzini d1c454
+          'arguments': {
Paolo Bonzini d1c454
+              'node-name': 'drv0',
Paolo Bonzini d1c454
+              'driver': 'IMGFMT',
Paolo Bonzini d1c454
+              'file': {
Paolo Bonzini d1c454
+                  'driver': 'file',
Paolo Bonzini d1c454
+                  'filename': 'TEST_DIR/t.IMGFMT'
Paolo Bonzini d1c454
+              }}}
Paolo Bonzini d1c454
+{"return": {}}
Paolo Bonzini d1c454
+{'execute': 'block-commit',
Paolo Bonzini d1c454
+'arguments': {'job-id': 'job0', 'device': 'drv0'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: commit"}}
Paolo Bonzini d1c454
-{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
+{'execute': 'block-job-cancel',
Paolo Bonzini d1c454
+          'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Testing non-active block-commit ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 wrote 1048576/1048576 bytes at offset 0
Paolo Bonzini d1c454
 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
-{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': 'IMGFMT', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT' }}}
Paolo Bonzini d1c454
-{"return": {}}
Paolo Bonzini d1c454
-{'execute': 'block-commit', 'arguments': {'job-id': 'job0', 'device': 'drv0', 'top': 'TEST_DIR/m.IMGFMT', 'speed': 1}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-add',
Paolo Bonzini d1c454
+          'arguments': {
Paolo Bonzini d1c454
+              'node-name': 'drv0',
Paolo Bonzini d1c454
+              'driver': 'IMGFMT',
Paolo Bonzini d1c454
+              'file': {
Paolo Bonzini d1c454
+                  'driver': 'file',
Paolo Bonzini d1c454
+                  'filename': 'TEST_DIR/t.IMGFMT'
Paolo Bonzini d1c454
+              }}}
Paolo Bonzini d1c454
+{"return": {}}
Paolo Bonzini d1c454
+{'execute': 'block-commit',
Paolo Bonzini d1c454
+'arguments': {'job-id': 'job0',
Paolo Bonzini d1c454
+'device': 'drv0',
Paolo Bonzini d1c454
+'top':    'TEST_DIR/m.IMGFMT',
Paolo Bonzini d1c454
+'speed':  1}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Node drv0 is in use"}}
Paolo Bonzini d1c454
-{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
+{'execute': 'block-job-cancel',
Paolo Bonzini d1c454
+          'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset": 524288, "speed": 1, "type": "commit"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Testing block-stream ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 wrote 1048576/1048576 bytes at offset 0
Paolo Bonzini d1c454
 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
-{'execute': 'blockdev-add', 'arguments': { 'node-name': 'drv0', 'driver': 'IMGFMT', 'file': { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT' }}}
Paolo Bonzini d1c454
-{"return": {}}
Paolo Bonzini d1c454
-{'execute': 'block-stream', 'arguments': {'job-id': 'job0', 'device': 'drv0', 'speed': 1}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-add',
Paolo Bonzini d1c454
+          'arguments': {
Paolo Bonzini d1c454
+              'node-name': 'drv0',
Paolo Bonzini d1c454
+              'driver': 'IMGFMT',
Paolo Bonzini d1c454
+              'file': {
Paolo Bonzini d1c454
+                  'driver': 'file',
Paolo Bonzini d1c454
+                  'filename': 'TEST_DIR/t.IMGFMT'
Paolo Bonzini d1c454
+              }}}
Paolo Bonzini d1c454
+{"return": {}}
Paolo Bonzini d1c454
+{'execute': 'block-stream',
Paolo Bonzini d1c454
+'arguments': {'job-id': 'job0',
Paolo Bonzini d1c454
+'device': 'drv0',
Paolo Bonzini d1c454
+'speed': 1}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Node drv0 is in use"}}
Paolo Bonzini d1c454
-{'execute': 'block-job-cancel', 'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
+{'execute': 'block-job-cancel',
Paolo Bonzini d1c454
+          'arguments': {'device': 'job0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset": 524288, "speed": 1, "type": "stream"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-del', 'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-del',
Paolo Bonzini d1c454
+          'arguments': {'node-name': 'drv0'}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 *** done
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/143.out b/tests/qemu-iotests/143.out
Paolo Bonzini d1c454
index fc9c0a761f..9ec5888e0e 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/143.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/143.out
Paolo Bonzini d1c454
@@ -1,7 +1,9 @@
Paolo Bonzini d1c454
 QA output created by 143
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'nbd-server-start', 'arguments': { 'addr': { 'type': 'unix', 'data': { 'path': 'SOCK_DIR/nbd' }}}}
Paolo Bonzini d1c454
+{ 'execute': 'nbd-server-start',
Paolo Bonzini d1c454
+       'arguments': { 'addr': { 'type': 'unix',
Paolo Bonzini d1c454
+                                'data': { 'path': 'SOCK_DIR/nbd' }}}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 qemu-io: can't open device nbd+unix:///no_such_export?socket=SOCK_DIR/nbd: Requested export not available
Paolo Bonzini d1c454
 server reported: export 'no_such_export' not present
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/144.out b/tests/qemu-iotests/144.out
Paolo Bonzini d1c454
index 13e0c4f5a7..b3b4812015 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/144.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/144.out
Paolo Bonzini d1c454
@@ -8,19 +8,33 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=536870912
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0', 'snapshot-file':'TEST_DIR/tmp.IMGFMT', 'format': 'IMGFMT' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot-sync',
Paolo Bonzini d1c454
+                                'arguments': {
Paolo Bonzini d1c454
+                                             'device': 'virtio0',
Paolo Bonzini d1c454
+                                             'snapshot-file':'TEST_DIR/tmp.IMGFMT',
Paolo Bonzini d1c454
+                                             'format': 'IMGFMT'
Paolo Bonzini d1c454
+                                             }
Paolo Bonzini d1c454
+                    }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/tmp.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=536870912 backing_file=TEST_DIR/t.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Performing block-commit on active layer ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'block-commit', 'arguments': { 'device': 'virtio0' } }
Paolo Bonzini d1c454
+{ 'execute': 'block-commit',
Paolo Bonzini d1c454
+                                'arguments': {
Paolo Bonzini d1c454
+                                                 'device': 'virtio0'
Paolo Bonzini d1c454
+                                              }
Paolo Bonzini d1c454
+                    }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "virtio0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "virtio0"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "virtio0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "virtio0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}}
Paolo Bonzini d1c454
-{ 'execute': 'block-job-complete', 'arguments': { 'device': 'virtio0' } }
Paolo Bonzini d1c454
+{ 'execute': 'block-job-complete',
Paolo Bonzini d1c454
+                                'arguments': {
Paolo Bonzini d1c454
+                                                'device': 'virtio0'
Paolo Bonzini d1c454
+                                              }
Paolo Bonzini d1c454
+                   }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "virtio0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "virtio0"}}
Paolo Bonzini d1c454
@@ -30,7 +44,13 @@ Formatting 'TEST_DIR/tmp.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off co
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Performing Live Snapshot 2 ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'virtio0', 'snapshot-file':'TEST_DIR/tmp2.IMGFMT', 'format': 'IMGFMT' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot-sync',
Paolo Bonzini d1c454
+                                'arguments': {
Paolo Bonzini d1c454
+                                                'device': 'virtio0',
Paolo Bonzini d1c454
+                                                'snapshot-file':'TEST_DIR/tmp2.IMGFMT',
Paolo Bonzini d1c454
+                                                'format': 'IMGFMT'
Paolo Bonzini d1c454
+                                              }
Paolo Bonzini d1c454
+                   }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/tmp2.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=536870912 backing_file=TEST_DIR/t.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 *** done
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/153.out b/tests/qemu-iotests/153.out
Paolo Bonzini d1c454
index fcaa71aeee..ff8e55864a 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/153.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/153.out
Paolo Bonzini d1c454
@@ -425,7 +425,8 @@ _qemu_img_wrapper commit -b TEST_DIR/t.qcow2.b TEST_DIR/t.qcow2.c
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 Adding drive
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'drive_add 0 if=none,id=d0,file=TEST_DIR/t.IMGFMT' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line': 'drive_add 0 if=none,id=d0,file=TEST_DIR/t.IMGFMT' } }
Paolo Bonzini d1c454
 {"return": "OKrn"}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 _qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
Paolo Bonzini d1c454
@@ -435,25 +436,30 @@ Creating overlay with qemu-img when the guest is running should be allowed
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 _qemu_img_wrapper create -f qcow2 -b TEST_DIR/t.qcow2 -F qcow2 TEST_DIR/t.qcow2.overlay
Paolo Bonzini d1c454
 == Closing an image should unlock it ==
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'drive_del d0' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line': 'drive_del d0' } }
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 _qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
Paolo Bonzini d1c454
 Adding two and closing one
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'drive_add 0 if=none,id=d0,file=TEST_DIR/t.IMGFMT,readonly=on' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+           'arguments': { 'command-line': 'drive_add 0 if=none,id=d0,file=TEST_DIR/t.IMGFMT,readonly=on' } }
Paolo Bonzini d1c454
 {"return": "OKrn"}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'drive_add 0 if=none,id=d1,file=TEST_DIR/t.IMGFMT,readonly=on' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+           'arguments': { 'command-line': 'drive_add 0 if=none,id=d1,file=TEST_DIR/t.IMGFMT,readonly=on' } }
Paolo Bonzini d1c454
 {"return": "OKrn"}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 _qemu_img_wrapper info TEST_DIR/t.qcow2
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'drive_del d0' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line': 'drive_del d0' } }
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 _qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
Paolo Bonzini d1c454
 qemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
Paolo Bonzini d1c454
 Is another process using the image [TEST_DIR/t.qcow2]?
Paolo Bonzini d1c454
 Closing the other
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'drive_del d1' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line': 'drive_del d1' } }
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 _qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/156.out b/tests/qemu-iotests/156.out
Paolo Bonzini d1c454
index cce167b63f..4a22f0c41a 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/156.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/156.out
Paolo Bonzini d1c454
@@ -8,24 +8,37 @@ wrote 196608/196608 bytes at offset 65536
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT.overlay', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.IMGFMT backing_fmt=IMGFMT
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'source', 'snapshot-file': 'TEST_DIR/t.IMGFMT.overlay', 'format': 'IMGFMT', 'mode': 'existing' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot-sync',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'source',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/t.IMGFMT.overlay',
Paolo Bonzini d1c454
+                      'format': 'IMGFMT',
Paolo Bonzini d1c454
+                      'mode': 'existing' } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io source "write -P 3 128k 128k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io source "write -P 3 128k 128k"' } }
Paolo Bonzini d1c454
 wrote 131072/131072 bytes at offset 131072
Paolo Bonzini d1c454
 128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT.target.overlay', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.IMGFMT.target backing_fmt=IMGFMT
Paolo Bonzini d1c454
-{ 'execute': 'drive-mirror', 'arguments': { 'device': 'source', 'target': 'TEST_DIR/t.IMGFMT.target.overlay', 'mode': 'existing', 'sync': 'top' } }
Paolo Bonzini d1c454
+{ 'execute': 'drive-mirror',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'source',
Paolo Bonzini d1c454
+                      'target': 'TEST_DIR/t.IMGFMT.target.overlay',
Paolo Bonzini d1c454
+                      'mode': 'existing',
Paolo Bonzini d1c454
+                      'sync': 'top' } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "source"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "source"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "source"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "source", "len": 131072, "offset": 131072, "speed": 0, "type": "mirror"}}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io source "write -P 4 192k 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io source "write -P 4 192k 64k"' } }
Paolo Bonzini d1c454
 wrote 65536/65536 bytes at offset 196608
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
-{ 'execute': 'block-job-complete', 'arguments': { 'device': 'source' } }
Paolo Bonzini d1c454
+{ 'execute': 'block-job-complete',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'source' } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "source"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "source"}}
Paolo Bonzini d1c454
@@ -33,19 +46,27 @@ wrote 65536/65536 bytes at offset 196608
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "source"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "source"}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io source "read -P 1 0k 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io source "read -P 1 0k 64k"' } }
Paolo Bonzini d1c454
 read 65536/65536 bytes at offset 0
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io source "read -P 2 64k 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io source "read -P 2 64k 64k"' } }
Paolo Bonzini d1c454
 read 65536/65536 bytes at offset 65536
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io source "read -P 3 128k 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io source "read -P 3 128k 64k"' } }
Paolo Bonzini d1c454
 read 65536/65536 bytes at offset 131072
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io source "read -P 4 192k 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io source "read -P 4 192k 64k"' } }
Paolo Bonzini d1c454
 read 65536/65536 bytes at offset 196608
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/161.out b/tests/qemu-iotests/161.out
Paolo Bonzini d1c454
index 3d8d89a9da..6cc285afcf 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/161.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/161.out
Paolo Bonzini d1c454
@@ -7,18 +7,23 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io none0 "reopen -o backing.detect-zeroes=on"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io none0 "reopen -o backing.detect-zeroes=on"' } }
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 *** Stream and then change an option on the backing file
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'block-stream', 'arguments': { 'device': 'none0', 'base': 'TEST_DIR/t.IMGFMT.base' } }
Paolo Bonzini d1c454
+{ 'execute': 'block-stream',        'arguments': { 'device': 'none0',
Paolo Bonzini d1c454
+                      'base': 'TEST_DIR/t.IMGFMT.base' } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "none0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "none0"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io none0 "reopen -o backing.detect-zeroes=on"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io none0 "reopen -o backing.detect-zeroes=on"' } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "none0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "none0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "none0", "len": 1048576, "offset": 1048576, "speed": 0, "type": "stream"}}
Paolo Bonzini d1c454
@@ -33,11 +38,14 @@ Formatting 'TEST_DIR/t.IMGFMT.int', fmt=IMGFMT size=1048576 backing_file=TEST_DI
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.IMGFMT.int backing_fmt=IMGFMT
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'block-commit', 'arguments': { 'device': 'none0', 'top': 'TEST_DIR/t.IMGFMT.int' } }
Paolo Bonzini d1c454
+{ 'execute': 'block-commit',        'arguments': { 'device': 'none0',
Paolo Bonzini d1c454
+                      'top': 'TEST_DIR/t.IMGFMT.int' } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "none0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "none0"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io none0 "reopen -o backing.detect-zeroes=on"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io none0 "reopen -o backing.detect-zeroes=on"' } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "none0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "none0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "none0", "len": 1048576, "offset": 1048576, "speed": 0, "type": "commit"}}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/173.out b/tests/qemu-iotests/173.out
Paolo Bonzini d1c454
index b5114b5c79..2d6490d680 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/173.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/173.out
Paolo Bonzini d1c454
@@ -6,11 +6,30 @@ Formatting 'TEST_DIR/image.snp1', fmt=IMGFMT size=104857600
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'arguments': { 'device': 'disk2', 'format': 'IMGFMT', 'mode': 'existing', 'snapshot-file': 'TEST_DIR/image.snp1', 'snapshot-node-name': 'snp1' }, 'execute': 'blockdev-snapshot-sync' }
Paolo Bonzini d1c454
+{ 'arguments': {
Paolo Bonzini d1c454
+                        'device': 'disk2',
Paolo Bonzini d1c454
+                        'format': 'IMGFMT',
Paolo Bonzini d1c454
+                        'mode': 'existing',
Paolo Bonzini d1c454
+                        'snapshot-file': 'TEST_DIR/image.snp1',
Paolo Bonzini d1c454
+                        'snapshot-node-name': 'snp1'
Paolo Bonzini d1c454
+                     },
Paolo Bonzini d1c454
+                     'execute': 'blockdev-snapshot-sync'
Paolo Bonzini d1c454
+                   }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'arguments': { 'backing-file': 'image.base', 'device': 'disk2', 'image-node-name': 'snp1' }, 'execute': 'change-backing-file' }
Paolo Bonzini d1c454
+{ 'arguments': {
Paolo Bonzini d1c454
+                        'backing-file': 'image.base',
Paolo Bonzini d1c454
+                        'device': 'disk2',
Paolo Bonzini d1c454
+                        'image-node-name': 'snp1'
Paolo Bonzini d1c454
+                     },
Paolo Bonzini d1c454
+                     'execute': 'change-backing-file'
Paolo Bonzini d1c454
+                   }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'arguments': { 'base': 'TEST_DIR/image.base', 'device': 'disk2' }, 'execute': 'block-stream' }
Paolo Bonzini d1c454
+{ 'arguments': {
Paolo Bonzini d1c454
+                        'base': 'TEST_DIR/image.base',
Paolo Bonzini d1c454
+                        'device': 'disk2'
Paolo Bonzini d1c454
+                      },
Paolo Bonzini d1c454
+                      'execute': 'block-stream'
Paolo Bonzini d1c454
+                   }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk2"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk2"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/182.out b/tests/qemu-iotests/182.out
Paolo Bonzini d1c454
index ce23340670..57f7265458 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/182.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/182.out
Paolo Bonzini d1c454
@@ -10,16 +10,42 @@ Is another process using the image [TEST_DIR/t.qcow2]?
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 {'execute': 'qmp_capabilities'}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-add', 'arguments': { 'node-name': 'node0', 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT', 'locking': 'on' } }
Paolo Bonzini d1c454
-{"return": {}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-snapshot-sync', 'arguments': { 'node-name': 'node0', 'snapshot-file': 'TEST_DIR/t.IMGFMT.overlay', 'snapshot-node-name': 'node1' } }
Paolo Bonzini d1c454
+{'execute': 'blockdev-add',
Paolo Bonzini d1c454
+      'arguments': {
Paolo Bonzini d1c454
+          'node-name': 'node0',
Paolo Bonzini d1c454
+          'driver': 'file',
Paolo Bonzini d1c454
+          'filename': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+          'locking': 'on'
Paolo Bonzini d1c454
+          } }
Paolo Bonzini d1c454
+{"return": {}}
Paolo Bonzini d1c454
+{'execute': 'blockdev-snapshot-sync',
Paolo Bonzini d1c454
+      'arguments': {
Paolo Bonzini d1c454
+          'node-name': 'node0',
Paolo Bonzini d1c454
+          'snapshot-file': 'TEST_DIR/t.IMGFMT.overlay',
Paolo Bonzini d1c454
+          'snapshot-node-name': 'node1'
Paolo Bonzini d1c454
+      } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.qcow2.overlay', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=197120 backing_file=TEST_DIR/t.qcow2 backing_fmt=file lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{'execute': 'blockdev-add', 'arguments': { 'node-name': 'node1', 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT', 'locking': 'on' } }
Paolo Bonzini d1c454
-{"return": {}}
Paolo Bonzini d1c454
-{'execute': 'nbd-server-start', 'arguments': { 'addr': { 'type': 'unix', 'data': { 'path': 'SOCK_DIR/nbd.socket' } } } }
Paolo Bonzini d1c454
-{"return": {}}
Paolo Bonzini d1c454
-{'execute': 'nbd-server-add', 'arguments': { 'device': 'node1' } }
Paolo Bonzini d1c454
+{'execute': 'blockdev-add',
Paolo Bonzini d1c454
+      'arguments': {
Paolo Bonzini d1c454
+          'node-name': 'node1',
Paolo Bonzini d1c454
+          'driver': 'file',
Paolo Bonzini d1c454
+          'filename': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+          'locking': 'on'
Paolo Bonzini d1c454
+          } }
Paolo Bonzini d1c454
+{"return": {}}
Paolo Bonzini d1c454
+{'execute': 'nbd-server-start',
Paolo Bonzini d1c454
+      'arguments': {
Paolo Bonzini d1c454
+          'addr': {
Paolo Bonzini d1c454
+              'type': 'unix',
Paolo Bonzini d1c454
+              'data': {
Paolo Bonzini d1c454
+                  'path': 'SOCK_DIR/nbd.socket'
Paolo Bonzini d1c454
+              } } } }
Paolo Bonzini d1c454
+{"return": {}}
Paolo Bonzini d1c454
+{'execute': 'nbd-server-add',
Paolo Bonzini d1c454
+      'arguments': {
Paolo Bonzini d1c454
+          'device': 'node1'
Paolo Bonzini d1c454
+      } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Testing failure to loosen restrictions ===
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/183.out b/tests/qemu-iotests/183.out
Paolo Bonzini d1c454
index d4be2cb2de..fd9c2e52a5 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/183.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/183.out
Paolo Bonzini d1c454
@@ -11,18 +11,23 @@ Formatting 'TEST_DIR/t.IMGFMT.dest', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Write something on the source ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io disk "write -P 0x55 0 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io disk "write -P 0x55 0 64k"' } }
Paolo Bonzini d1c454
 wrote 65536/65536 bytes at offset 0
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io disk "read -P 0x55 0 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io disk "read -P 0x55 0 64k"' } }
Paolo Bonzini d1c454
 read 65536/65536 bytes at offset 0
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Do block migration to destination ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'migrate', 'arguments': { 'uri': 'unix:SOCK_DIR/migrate', 'blk': true } }
Paolo Bonzini d1c454
+{ 'execute': 'migrate',
Paolo Bonzini d1c454
+       'arguments': { 'uri': 'unix:SOCK_DIR/migrate', 'blk': true } }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 { 'execute': 'query-status' }
Paolo Bonzini d1c454
 {"return": {"status": "postmigrate", "singlestep": false, "running": false}}
Paolo Bonzini d1c454
@@ -32,11 +37,15 @@ read 65536/65536 bytes at offset 0
Paolo Bonzini d1c454
 { 'execute': 'query-status' }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "RESUME"}
Paolo Bonzini d1c454
 {"return": {"status": "running", "singlestep": false, "running": true}}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io disk "read -P 0x55 0 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io disk "read -P 0x55 0 64k"' } }
Paolo Bonzini d1c454
 read 65536/65536 bytes at offset 0
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io disk "write -P 0x66 1M 64k"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io disk "write -P 0x66 1M 64k"' } }
Paolo Bonzini d1c454
 wrote 65536/65536 bytes at offset 1048576
Paolo Bonzini d1c454
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/185.out b/tests/qemu-iotests/185.out
Paolo Bonzini d1c454
index 339438ac68..eab55d22bf 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/185.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/185.out
Paolo Bonzini d1c454
@@ -8,20 +8,34 @@ Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Creating backing chain ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'disk', 'snapshot-file': 'TEST_DIR/t.IMGFMT.mid', 'format': 'IMGFMT', 'mode': 'absolute-paths' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot-sync',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'disk',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/t.IMGFMT.mid',
Paolo Bonzini d1c454
+                      'format': 'IMGFMT',
Paolo Bonzini d1c454
+                      'mode': 'absolute-paths' } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.qcow2.mid', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 backing_file=TEST_DIR/t.qcow2.base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'qemu-io disk "write 0 4M"' } }
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': { 'command-line':
Paolo Bonzini d1c454
+                      'qemu-io disk "write 0 4M"' } }
Paolo Bonzini d1c454
 wrote 4194304/4194304 bytes at offset 0
Paolo Bonzini d1c454
 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Paolo Bonzini d1c454
 {"return": ""}
Paolo Bonzini d1c454
-{ 'execute': 'blockdev-snapshot-sync', 'arguments': { 'device': 'disk', 'snapshot-file': 'TEST_DIR/t.IMGFMT', 'format': 'IMGFMT', 'mode': 'absolute-paths' } }
Paolo Bonzini d1c454
+{ 'execute': 'blockdev-snapshot-sync',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'disk',
Paolo Bonzini d1c454
+                      'snapshot-file': 'TEST_DIR/t.IMGFMT',
Paolo Bonzini d1c454
+                      'format': 'IMGFMT',
Paolo Bonzini d1c454
+                      'mode': 'absolute-paths' } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 backing_file=TEST_DIR/t.qcow2.mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Start commit job and exit qemu ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'block-commit', 'arguments': { 'device': 'disk', 'base':'TEST_DIR/t.IMGFMT.base', 'top': 'TEST_DIR/t.IMGFMT.mid', 'speed': 65536 } }
Paolo Bonzini d1c454
+{ 'execute': 'block-commit',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'disk',
Paolo Bonzini d1c454
+                      'base':'TEST_DIR/t.IMGFMT.base',
Paolo Bonzini d1c454
+                      'top': 'TEST_DIR/t.IMGFMT.mid',
Paolo Bonzini d1c454
+                      'speed': 65536 } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -34,7 +48,10 @@ Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off comp
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'block-commit', 'arguments': { 'device': 'disk', 'base':'TEST_DIR/t.IMGFMT.base', 'speed': 65536 } }
Paolo Bonzini d1c454
+{ 'execute': 'block-commit',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'disk',
Paolo Bonzini d1c454
+                      'base':'TEST_DIR/t.IMGFMT.base',
Paolo Bonzini d1c454
+                      'speed': 65536 } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -47,7 +64,12 @@ Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off comp
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'drive-mirror', 'arguments': { 'device': 'disk', 'target': 'TEST_DIR/t.IMGFMT.copy', 'format': 'IMGFMT', 'sync': 'full', 'speed': 65536 } }
Paolo Bonzini d1c454
+{ 'execute': 'drive-mirror',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'disk',
Paolo Bonzini d1c454
+                      'target': 'TEST_DIR/t.IMGFMT.copy',
Paolo Bonzini d1c454
+                      'format': 'IMGFMT',
Paolo Bonzini d1c454
+                      'sync': 'full',
Paolo Bonzini d1c454
+                      'speed': 65536 } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
Paolo Bonzini d1c454
@@ -61,7 +83,12 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 cluster_size=65536 extended_l2=off
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'drive-backup', 'arguments': { 'device': 'disk', 'target': 'TEST_DIR/t.IMGFMT.copy', 'format': 'IMGFMT', 'sync': 'full', 'speed': 65536 } }
Paolo Bonzini d1c454
+{ 'execute': 'drive-backup',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'disk',
Paolo Bonzini d1c454
+                      'target': 'TEST_DIR/t.IMGFMT.copy',
Paolo Bonzini d1c454
+                      'format': 'IMGFMT',
Paolo Bonzini d1c454
+                      'sync': 'full',
Paolo Bonzini d1c454
+                      'speed': 65536 } }
Paolo Bonzini d1c454
 Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
Paolo Bonzini d1c454
@@ -77,7 +104,9 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 cluster_size=65536 extended_l2=off
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 { 'execute': 'qmp_capabilities' }
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{ 'execute': 'block-stream', 'arguments': { 'device': 'disk', 'speed': 65536 } }
Paolo Bonzini d1c454
+{ 'execute': 'block-stream',
Paolo Bonzini d1c454
+       'arguments': { 'device': 'disk',
Paolo Bonzini d1c454
+                      'speed': 65536 } }
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/191.out b/tests/qemu-iotests/191.out
Paolo Bonzini d1c454
index 11aaf3b691..022021efab 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/191.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/191.out
Paolo Bonzini d1c454
@@ -16,7 +16,11 @@ wrote 65536/65536 bytes at offset 1048576
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Perform commit job ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'block-commit', 'arguments': { 'job-id': 'commit0', 'device': 'top', 'base':'TEST_DIR/t.IMGFMT.base', 'top': 'TEST_DIR/t.IMGFMT.mid' } }
Paolo Bonzini d1c454
+{ 'execute': 'block-commit',
Paolo Bonzini d1c454
+       'arguments': { 'job-id': 'commit0',
Paolo Bonzini d1c454
+                      'device': 'top',
Paolo Bonzini d1c454
+                      'base':'TEST_DIR/t.IMGFMT.base',
Paolo Bonzini d1c454
+                      'top': 'TEST_DIR/t.IMGFMT.mid' } }
Paolo Bonzini d1c454
 {
Paolo Bonzini d1c454
     "timestamp": {
Paolo Bonzini d1c454
         "seconds":  TIMESTAMP,
Paolo Bonzini d1c454
@@ -427,7 +431,11 @@ wrote 65536/65536 bytes at offset 1048576
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Perform commit job ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'block-commit', 'arguments': { 'job-id': 'commit0', 'device': 'top', 'base':'TEST_DIR/t.IMGFMT.base', 'top': 'TEST_DIR/t.IMGFMT.mid' } }
Paolo Bonzini d1c454
+{ 'execute': 'block-commit',
Paolo Bonzini d1c454
+       'arguments': { 'job-id': 'commit0',
Paolo Bonzini d1c454
+                      'device': 'top',
Paolo Bonzini d1c454
+                      'base':'TEST_DIR/t.IMGFMT.base',
Paolo Bonzini d1c454
+                      'top': 'TEST_DIR/t.IMGFMT.mid' } }
Paolo Bonzini d1c454
 {
Paolo Bonzini d1c454
     "timestamp": {
Paolo Bonzini d1c454
         "seconds":  TIMESTAMP,
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223.out
Paolo Bonzini d1c454
index f6eac23f04..bbc85289e3 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/223.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/223.out
Paolo Bonzini d1c454
@@ -26,31 +26,48 @@ wrote 2097152/2097152 bytes at offset 2097152
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 {"execute":"qmp_capabilities"}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"blockdev-add", "arguments":{"driver":"IMGFMT", "node-name":"n", "file":{"driver":"file", "filename":"TEST_DIR/t.IMGFMT"}}}
Paolo Bonzini d1c454
+{"execute":"blockdev-add",
Paolo Bonzini d1c454
+  "arguments":{"driver":"IMGFMT", "node-name":"n",
Paolo Bonzini d1c454
+    "file":{"driver":"file", "filename":"TEST_DIR/t.IMGFMT"}}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"block-dirty-bitmap-disable", "arguments":{"node":"n", "name":"b"}}
Paolo Bonzini d1c454
+{"execute":"block-dirty-bitmap-disable",
Paolo Bonzini d1c454
+  "arguments":{"node":"n", "name":"b"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Set up NBD with normal access ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd"}}}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-start",
Paolo Bonzini d1c454
+  "arguments":{"addr":{"type":"unix",
Paolo Bonzini d1c454
+    "data":{"path":"SOCK_DIR/nbd"}}}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd1"}}}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-start",
Paolo Bonzini d1c454
+  "arguments":{"addr":{"type":"unix",
Paolo Bonzini d1c454
+    "data":{"path":"SOCK_DIR/nbd1"}}}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
Paolo Bonzini d1c454
 exports available: 0
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n", "bitmap":"b"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n", "bitmap":"b"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"nosuch"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"nosuch"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Cannot find device=nosuch nor node_name=nosuch"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Block export id 'n' is already in use"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b2"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n", "name":"n2",
Paolo Bonzini d1c454
+  "bitmap":"b2"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b3"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n", "name":"n2",
Paolo Bonzini d1c454
+  "bitmap":"b3"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, "description":"some text", "bitmap":"b2"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n", "name":"n2", "writable":true,
Paolo Bonzini d1c454
+  "description":"some text", "bitmap":"b2"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 exports available: 2
Paolo Bonzini d1c454
  export: 'n'
Paolo Bonzini d1c454
@@ -99,12 +116,15 @@ read 2097152/2097152 bytes at offset 2097152
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === End qemu NBD server ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{"execute":"nbd-server-remove", "arguments":{"name":"n"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-remove",
Paolo Bonzini d1c454
+  "arguments":{"name":"n"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-remove",
Paolo Bonzini d1c454
+  "arguments":{"name":"n2"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-remove",
Paolo Bonzini d1c454
+  "arguments":{"name":"n2"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
Paolo Bonzini d1c454
 {"execute":"nbd-server-stop"}
Paolo Bonzini d1c454
@@ -114,26 +134,41 @@ read 2097152/2097152 bytes at offset 2097152
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Set up NBD with iothread access ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{"execute":"x-blockdev-set-iothread", "arguments":{"node-name":"n", "iothread":"io0"}}
Paolo Bonzini d1c454
+{"execute":"x-blockdev-set-iothread",
Paolo Bonzini d1c454
+  "arguments":{"node-name":"n", "iothread":"io0"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd"}}}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-start",
Paolo Bonzini d1c454
+  "arguments":{"addr":{"type":"unix",
Paolo Bonzini d1c454
+    "data":{"path":"SOCK_DIR/nbd"}}}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd1"}}}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-start",
Paolo Bonzini d1c454
+  "arguments":{"addr":{"type":"unix",
Paolo Bonzini d1c454
+    "data":{"path":"SOCK_DIR/nbd1"}}}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
Paolo Bonzini d1c454
 exports available: 0
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n", "bitmap":"b"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n", "bitmap":"b"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"nosuch"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"nosuch"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Cannot find device=nosuch nor node_name=nosuch"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Block export id 'n' is already in use"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b2"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n", "name":"n2",
Paolo Bonzini d1c454
+  "bitmap":"b2"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b3"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n", "name":"n2",
Paolo Bonzini d1c454
+  "bitmap":"b3"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, "description":"some text", "bitmap":"b2"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-add",
Paolo Bonzini d1c454
+  "arguments":{"device":"n", "name":"n2", "writable":true,
Paolo Bonzini d1c454
+  "description":"some text", "bitmap":"b2"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 exports available: 2
Paolo Bonzini d1c454
  export: 'n'
Paolo Bonzini d1c454
@@ -182,12 +217,15 @@ read 2097152/2097152 bytes at offset 2097152
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === End qemu NBD server ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{"execute":"nbd-server-remove", "arguments":{"name":"n"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-remove",
Paolo Bonzini d1c454
+  "arguments":{"name":"n"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-remove",
Paolo Bonzini d1c454
+  "arguments":{"name":"n2"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
-{"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
Paolo Bonzini d1c454
+{"execute":"nbd-server-remove",
Paolo Bonzini d1c454
+  "arguments":{"name":"n2"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
Paolo Bonzini d1c454
 {"execute":"nbd-server-stop"}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/229.out b/tests/qemu-iotests/229.out
Paolo Bonzini d1c454
index 7eed393013..7d2bfbfbe6 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/229.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/229.out
Paolo Bonzini d1c454
@@ -8,7 +8,14 @@
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Starting drive-mirror, causing error & stop  ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{'execute': 'drive-mirror', 'arguments': {'device': 'testdisk', 'format': 'IMGFMT', 'target': 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/d.IMGFMT', 'sync': 'full', 'mode': 'existing', 'on-source-error': 'stop', 'on-target-error': 'stop' }}
Paolo Bonzini d1c454
+{'execute': 'drive-mirror',
Paolo Bonzini d1c454
+                 'arguments': {'device': 'testdisk',
Paolo Bonzini d1c454
+                               'format': 'IMGFMT',
Paolo Bonzini d1c454
+                               'target': 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/d.IMGFMT',
Paolo Bonzini d1c454
+                               'sync':   'full',
Paolo Bonzini d1c454
+                               'mode':   'existing',
Paolo Bonzini d1c454
+                               'on-source-error': 'stop',
Paolo Bonzini d1c454
+                               'on-target-error': 'stop' }}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "testdisk"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "testdisk"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -17,7 +24,9 @@
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Force cancel job paused in error state  ===
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{'execute': 'block-job-cancel', 'arguments': { 'device': 'testdisk', 'force': true}}
Paolo Bonzini d1c454
+{'execute': 'block-job-cancel',
Paolo Bonzini d1c454
+                 'arguments': { 'device': 'testdisk',
Paolo Bonzini d1c454
+                                'force': true}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "testdisk"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "testdisk"}}
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/249.out b/tests/qemu-iotests/249.out
Paolo Bonzini d1c454
index 85acda4635..92ec81db03 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/249.out
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/249.out
Paolo Bonzini d1c454
@@ -7,24 +7,29 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Send a write command to a drive opened in read-only mode (1)
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}}
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}}
Paolo Bonzini d1c454
 {"return": "Block node is read-onlyrn"}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Run block-commit on base using an invalid filter node name
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'block-commit', 'arguments': {'job-id': 'job0', 'device': 'none1', 'top-node': 'int', 'filter-node-name': '1234'}}
Paolo Bonzini d1c454
+{ 'execute': 'block-commit',
Paolo Bonzini d1c454
+       'arguments': {'job-id': 'job0', 'device': 'none1', 'top-node': 'int',
Paolo Bonzini d1c454
+                     'filter-node-name': '1234'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}}
Paolo Bonzini d1c454
 {"error": {"class": "GenericError", "desc": "Invalid node name"}}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Send a write command to a drive opened in read-only mode (2)
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}}
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}}
Paolo Bonzini d1c454
 {"return": "Block node is read-onlyrn"}
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Run block-commit on base using the default filter node name
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'block-commit', 'arguments': {'job-id': 'job0', 'device': 'none1', 'top-node': 'int'}}
Paolo Bonzini d1c454
+{ 'execute': 'block-commit',
Paolo Bonzini d1c454
+       'arguments': {'job-id': 'job0', 'device': 'none1', 'top-node': 'int'}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}}
Paolo Bonzini d1c454
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}}
Paolo Bonzini d1c454
 {"return": {}}
Paolo Bonzini d1c454
@@ -36,6 +41,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
 === Send a write command to a drive opened in read-only mode (3)
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
-{ 'execute': 'human-monitor-command', 'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}}
Paolo Bonzini d1c454
+{ 'execute': 'human-monitor-command',
Paolo Bonzini d1c454
+       'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}}
Paolo Bonzini d1c454
 {"return": "Block node is read-onlyrn"}
Paolo Bonzini d1c454
 *** done
Paolo Bonzini d1c454
diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
Paolo Bonzini d1c454
index de680cf1c7..ef105dfc39 100644
Paolo Bonzini d1c454
--- a/tests/qemu-iotests/common.qemu
Paolo Bonzini d1c454
+++ b/tests/qemu-iotests/common.qemu
Paolo Bonzini d1c454
@@ -146,14 +146,9 @@ _send_qemu_cmd()
Paolo Bonzini d1c454
         count=${qemu_cmd_repeat}
Paolo Bonzini d1c454
         use_error="no"
Paolo Bonzini d1c454
     fi
Paolo Bonzini d1c454
-    # This array element extraction is done to accommodate pathnames with spaces
Paolo Bonzini d1c454
-    if [ -z "${success_or_failure}" ]; then
Paolo Bonzini d1c454
-        cmd=${@: 1:${#@}-1}
Paolo Bonzini d1c454
-        shift $(($# - 1))
Paolo Bonzini d1c454
-    else
Paolo Bonzini d1c454
-        cmd=${@: 1:${#@}-2}
Paolo Bonzini d1c454
-        shift $(($# - 2))
Paolo Bonzini d1c454
-    fi
Paolo Bonzini d1c454
+
Paolo Bonzini d1c454
+    cmd=$1
Paolo Bonzini d1c454
+    shift
Paolo Bonzini d1c454
 
Paolo Bonzini d1c454
     # Display QMP being sent, but not HMP (since HMP already echoes its
Paolo Bonzini d1c454
     # input back to output); decide based on leading '{'
Paolo Bonzini d1c454
-- 
Paolo Bonzini d1c454
2.29.2
Paolo Bonzini d1c454