Signed-off-by: Marc-André Lureau <[email protected]>
---
 tests/qemu-iotests/156     | 37 ++++++++++++++--------------
 tests/qemu-iotests/156.out | 60 +++++++++++++++++++---------------------------
 2 files changed, 42 insertions(+), 55 deletions(-)

diff --git a/tests/qemu-iotests/156 b/tests/qemu-iotests/156
index a0e4d1ffd42a..1b0c955c4222 100755
--- a/tests/qemu-iotests/156
+++ b/tests/qemu-iotests/156
@@ -53,7 +53,6 @@ _supported_fmt qcow2 qed
 _supported_proto file
 # Copying files around with cp does not work with external data files
 _unsupported_imgopts data_file
-_require_hmp
 
 # Create source disk
 TEST_IMG="$TEST_IMG.backing" _make_test_img 1M
@@ -80,9 +79,9 @@ _send_qemu_cmd $QEMU_HANDLE \
 
 # Write something to the snapshot
 _send_qemu_cmd $QEMU_HANDLE \
-    "{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source \"write -P 3 128k 128k\"' } }" \
+    "{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'write -P 3 128k 128k' } }" \
     'return'
 
 # Create target image
@@ -105,9 +104,9 @@ _send_qemu_cmd $QEMU_HANDLE \
 
 # Write some more
 _send_qemu_cmd $QEMU_HANDLE \
-    "{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source \"write -P 4 192k 64k\"' } }" \
+    "{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'write -P 4 192k 64k' } }" \
     'return'
 
 # Copy source backing chain to the target before completing the job
@@ -134,27 +133,27 @@ echo
 
 # Check online disk contents
 _send_qemu_cmd $QEMU_HANDLE \
-    "{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source \"read -P 1 0k 64k\"' } }" \
+    "{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'read -P 1 0k 64k' } }" \
     'return'
 
 _send_qemu_cmd $QEMU_HANDLE \
-    "{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source \"read -P 2 64k 64k\"' } }" \
+    "{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'read -P 2 64k 64k' } }" \
     'return'
 
 _send_qemu_cmd $QEMU_HANDLE \
-    "{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source \"read -P 3 128k 64k\"' } }" \
+    "{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'read -P 3 128k 64k' } }" \
     'return'
 
 _send_qemu_cmd $QEMU_HANDLE \
-    "{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source \"read -P 4 192k 64k\"' } }" \
+    "{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'read -P 4 192k 64k' } }" \
     'return'
 
 echo
diff --git a/tests/qemu-iotests/156.out b/tests/qemu-iotests/156.out
index 07e5e83f5d4b..f91ce91d0d60 100644
--- a/tests/qemu-iotests/156.out
+++ b/tests/qemu-iotests/156.out
@@ -14,12 +14,10 @@ Formatting 'TEST_DIR/t.IMGFMT.overlay', fmt=IMGFMT 
size=1048576 backing_file=TES
                       'format': 'IMGFMT',
                       'mode': 'existing' } }
 {"return": {}}
-{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source "write -P 3 128k 128k"' } }
-wrote 131072/131072 bytes at offset 131072
-128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-{"return": ""}
+{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'write -P 3 128k 128k' } }
+{"return": {"human-readable-text": "wrote 131072/131072 bytes at offset 
131072\n128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
 Formatting 'TEST_DIR/t.IMGFMT.target.overlay', fmt=IMGFMT size=1048576 
backing_file=TEST_DIR/t.IMGFMT.target backing_fmt=IMGFMT
 { 'execute': 'drive-mirror',
        'arguments': { 'device': 'source',
@@ -31,12 +29,10 @@ Formatting 'TEST_DIR/t.IMGFMT.target.overlay', fmt=IMGFMT 
size=1048576 backing_f
 {"return": {}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": 
"JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "source"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": 
"BLOCK_JOB_READY", "data": {"device": "source", "len": 131072, "offset": 
131072, "speed": 0, "type": "mirror"}}
-{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source "write -P 4 192k 64k"' } }
-wrote 65536/65536 bytes at offset 196608
-64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-{"return": ""}
+{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'write -P 4 192k 64k' } }
+{"return": {"human-readable-text": "wrote 65536/65536 bytes at offset 
196608\n64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
 { 'execute': 'block-job-complete',
        'arguments': { 'device': 'source' } }
 {"return": {}}
@@ -46,30 +42,22 @@ wrote 65536/65536 bytes at offset 196608
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": 
"JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "source"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": 
"JOB_STATUS_CHANGE", "data": {"status": "null", "id": "source"}}
 
-{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source "read -P 1 0k 64k"' } }
-read 65536/65536 bytes at offset 0
-64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-{"return": ""}
-{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source "read -P 2 64k 64k"' } }
-read 65536/65536 bytes at offset 65536
-64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-{"return": ""}
-{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source "read -P 3 128k 64k"' } }
-read 65536/65536 bytes at offset 131072
-64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-{"return": ""}
-{ 'execute': 'human-monitor-command',
-       'arguments': { 'command-line':
-                      'qemu-io source "read -P 4 192k 64k"' } }
-read 65536/65536 bytes at offset 196608
-64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-{"return": ""}
+{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'read -P 1 0k 64k' } }
+{"return": {"human-readable-text": "read 65536/65536 bytes at offset 0\n64 
KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
+{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'read -P 2 64k 64k' } }
+{"return": {"human-readable-text": "read 65536/65536 bytes at offset 65536\n64 
KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
+{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'read -P 3 128k 64k' } }
+{"return": {"human-readable-text": "read 65536/65536 bytes at offset 
131072\n64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
+{ 'execute': 'x-qemu-io',
+       'arguments': { 'device': 'source',
+                      'command': 'read -P 4 192k 64k' } }
+{"return": {"human-readable-text": "read 65536/65536 bytes at offset 
196608\n64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
 
 { 'execute': 'quit' }
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": 
"SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}

-- 
2.56.0.rc0.29.g47ce80527c56


Reply via email to