Keep the vm_src/vm_dst log, even if they should be empty now.
Signed-off-by: Marc-André Lureau <[email protected]>
---
tests/qemu-iotests/tests/qsd-migrate | 23 ++++++++---------
tests/qemu-iotests/tests/qsd-migrate.out | 44 ++++++++++++--------------------
2 files changed, 27 insertions(+), 40 deletions(-)
diff --git a/tests/qemu-iotests/tests/qsd-migrate
b/tests/qemu-iotests/tests/qsd-migrate
index d76278b576c2..e0b0a8f1c914 100755
--- a/tests/qemu-iotests/tests/qsd-migrate
+++ b/tests/qemu-iotests/tests/qsd-migrate
@@ -20,12 +20,11 @@
import iotests
-from iotests import filter_qemu_io, filter_qtest
+from iotests import filter_qtest
iotests.script_initialize(supported_fmts=['qcow2', 'qed', 'raw'],
supported_protocols=['file'],
- supported_platforms=['linux'],
- require_hmp=True)
+ supported_platforms=['linux'])
with iotests.FilePath('disk.img') as path, \
iotests.FilePath('nbd-src.sock', base_dir=iotests.sock_dir) as nbd_src, \
@@ -75,9 +74,9 @@ with iotests.FilePath('disk.img') as path, \
vm_dst.launch()
iotests.log('\nTest I/O on the source')
- vm_src.hmp_qemu_io('virtio0/virtio-backend', 'write -P 0x11 0 4k',
+ vm_src.qmp_qemu_io('virtio0/virtio-backend', 'write -P 0x11 0 4k',
use_log=True, qdev=True)
- vm_src.hmp_qemu_io('virtio0/virtio-backend', 'read -P 0x11 0 4k',
+ vm_src.qmp_qemu_io('virtio0/virtio-backend', 'read -P 0x11 0 4k',
use_log=True, qdev=True)
iotests.log('\nStarting migration...')
@@ -100,9 +99,9 @@ with iotests.FilePath('disk.img') as path, \
# Reading is okay from both sides while the image is inactive. Note that
# the destination may have stale data until it activates the image, though.
- vm_src.hmp_qemu_io('virtio0/virtio-backend', 'read -P 0x11 0 4k',
+ vm_src.qmp_qemu_io('virtio0/virtio-backend', 'read -P 0x11 0 4k',
use_log=True, qdev=True)
- vm_dst.hmp_qemu_io('virtio0/virtio-backend', 'read 0 4k',
+ vm_dst.qmp_qemu_io('virtio0/virtio-backend', 'read 0 4k',
use_log=True, qdev=True)
iotests.log(qsd_dst.qmp('blockdev-set-active', {'active': True}))
@@ -115,13 +114,13 @@ with iotests.FilePath('disk.img') as path, \
iotests.log('\nTest I/O on the destination')
# Now the destination must see what the source wrote
- vm_dst.hmp_qemu_io('virtio0/virtio-backend', 'read -P 0x11 0 4k',
+ vm_dst.qmp_qemu_io('virtio0/virtio-backend', 'read -P 0x11 0 4k',
use_log=True, qdev=True)
# And be able to overwrite it
- vm_dst.hmp_qemu_io('virtio0/virtio-backend', 'write -P 0x22 0 4k',
+ vm_dst.qmp_qemu_io('virtio0/virtio-backend', 'write -P 0x22 0 4k',
use_log=True, qdev=True)
- vm_dst.hmp_qemu_io('virtio0/virtio-backend', 'read -P 0x22 0 4k',
+ vm_dst.qmp_qemu_io('virtio0/virtio-backend', 'read -P 0x22 0 4k',
use_log=True, qdev=True)
iotests.log('\nDone')
@@ -130,12 +129,12 @@ with iotests.FilePath('disk.img') as path, \
iotests.log('\n--- vm_src log ---')
log = vm_src.get_log()
if log:
- iotests.log(log, [filter_qtest, filter_qemu_io])
+ iotests.log(log, [filter_qtest])
qsd_src.stop()
vm_dst.shutdown()
iotests.log('\n--- vm_dst log ---')
log = vm_dst.get_log()
if log:
- iotests.log(log, [filter_qtest, filter_qemu_io])
+ iotests.log(log, [filter_qtest])
qsd_dst.stop()
diff --git a/tests/qemu-iotests/tests/qsd-migrate.out
b/tests/qemu-iotests/tests/qsd-migrate.out
index 4a5241e5d40f..e606e857ce9c 100644
--- a/tests/qemu-iotests/tests/qsd-migrate.out
+++ b/tests/qemu-iotests/tests/qsd-migrate.out
@@ -5,10 +5,10 @@ Launching destination QSD...
Launching destination VM...
Test I/O on the source
-{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io -d
virtio0/virtio-backend \"write -P 0x11 0 4k\""}}
-{"return": ""}
-{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io -d
virtio0/virtio-backend \"read -P 0x11 0 4k\""}}
-{"return": ""}
+{"execute": "x-qemu-io", "arguments": {"command": "write -P 0x11 0 4k",
"qdev": "virtio0/virtio-backend"}}
+{"return": {"human-readable-text": "wrote 4096/4096 bytes at offset 0\n4 KiB,
X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
+{"execute": "x-qemu-io", "arguments": {"command": "read -P 0x11 0 4k", "qdev":
"virtio0/virtio-backend"}}
+{"return": {"human-readable-text": "read 4096/4096 bytes at offset 0\n4 KiB, X
ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
Starting migration...
{"execute": "migrate-set-capabilities", "arguments": {"capabilities":
[{"capability": "events", "state": true}, {"capability":
"pause-before-switchover", "state": true}]}}
@@ -20,10 +20,10 @@ Starting migration...
Pre-switchover: Reconfigure QSD instances
{"return": {}}
-{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io -d
virtio0/virtio-backend \"read -P 0x11 0 4k\""}}
-{"return": ""}
-{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io -d
virtio0/virtio-backend \"read 0 4k\""}}
-{"return": ""}
+{"execute": "x-qemu-io", "arguments": {"command": "read -P 0x11 0 4k", "qdev":
"virtio0/virtio-backend"}}
+{"return": {"human-readable-text": "read 4096/4096 bytes at offset 0\n4 KiB, X
ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
+{"execute": "x-qemu-io", "arguments": {"command": "read 0 4k", "qdev":
"virtio0/virtio-backend"}}
+{"return": {"human-readable-text": "read 4096/4096 bytes at offset 0\n4 KiB, X
ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
{"return": {}}
Completing migration...
@@ -31,29 +31,17 @@ Completing migration...
{"return": {}}
Test I/O on the destination
-{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io -d
virtio0/virtio-backend \"read -P 0x11 0 4k\""}}
-{"return": ""}
-{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io -d
virtio0/virtio-backend \"write -P 0x22 0 4k\""}}
-{"return": ""}
-{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io -d
virtio0/virtio-backend \"read -P 0x22 0 4k\""}}
-{"return": ""}
+{"execute": "x-qemu-io", "arguments": {"command": "read -P 0x11 0 4k", "qdev":
"virtio0/virtio-backend"}}
+{"return": {"human-readable-text": "read 4096/4096 bytes at offset 0\n4 KiB, X
ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
+{"execute": "x-qemu-io", "arguments": {"command": "write -P 0x22 0 4k",
"qdev": "virtio0/virtio-backend"}}
+{"return": {"human-readable-text": "wrote 4096/4096 bytes at offset 0\n4 KiB,
X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
+{"execute": "x-qemu-io", "arguments": {"command": "read -P 0x22 0 4k", "qdev":
"virtio0/virtio-backend"}}
+{"return": {"human-readable-text": "read 4096/4096 bytes at offset 0\n4 KiB, X
ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n"}}
Done
--- vm_src log ---
-wrote 4096/4096 bytes at offset 0
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 0
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 0
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
--- vm_dst log ---
-read 4096/4096 bytes at offset 0
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 0
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 4096/4096 bytes at offset 0
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 0
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
--
2.56.0.rc0.29.g47ce80527c56