Skip to contentSkip to conversation

monitor: enable OOB by default

RFC Superseded Peter Xu 3 participants 17 messages May 31, 2018 – Jun 8, 2018

v2 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Peter Xu

author
#0 lore raw

v2 cover monitor: enable OOB by default

Patch 1: some more comment suggested by Markus on Out-Of-Band handlers.

Patch 2: touch up iotests to make sure after enabling OOB the randomly generated SHUTDOWN event won't fail any tests. Without this change, iotests (raw) will success but iotests (qcow2) may fail 2 tests out of 100+. With this patch applied, all tests pass. Kevin, Max, please help have a look on this one.

Patch 3: revert the x-oob parameter, turn OOB on.

Patch 4: revert the x-oob parameter usage in test. We can consider squash this patch into patch 3 to make sure no test will break. However I kept it separate at least for review.

Tests passed:

- make check
- iotests on both raw and qcow2

Please review. Thanks,

Peter Xu (4):
docs: mention shared state protect for OOB
tests: iotests: don't compare SHUTDOWN event
monitor: remove "x-oob", turn oob on by default
Revert "tests: Add parameter to qtest_init_without_qmp_handshake"

 docs/devel/qapi-code-gen.txt     |  3 +++
 include/monitor/monitor.h        |  1 -
 tests/libqtest.h                 |  7 ++----
 monitor.c                        | 17 +-------------
 tests/libqtest.c                 | 10 ++++----
 tests/qmp-test.c                 |  6 ++---
 vl.c                             |  5 ----
 tests/qemu-iotests/060.out       |  1 -
 tests/qemu-iotests/067.out       |  5 ++++
 tests/qemu-iotests/071.out       |  2 --
 tests/qemu-iotests/081.out       |  1 -
 tests/qemu-iotests/087.out       |  6 -----
 tests/qemu-iotests/094.out       |  1 -
 tests/qemu-iotests/109.out       | 22 ------------------
 tests/qemu-iotests/117.out       |  1 -
 tests/qemu-iotests/119.out       |  1 -
 tests/qemu-iotests/120.out       |  1 -
 tests/qemu-iotests/127.out       |  1 -
 tests/qemu-iotests/140.out       |  1 -
 tests/qemu-iotests/143.out       |  1 -
 tests/qemu-iotests/156.out       |  1 -
 tests/qemu-iotests/176.out       |  8 -------
 tests/qemu-iotests/183.out       |  2 --
 tests/qemu-iotests/184.out       | 40 --------------------------------
 tests/qemu-iotests/185.out       |  5 ----
 tests/qemu-iotests/191.out       | 20 ----------------
 tests/qemu-iotests/195.out       | 20 ----------------
 tests/qemu-iotests/206.out       | 11 ---------
 tests/qemu-iotests/207.out       |  6 -----
 tests/qemu-iotests/210.out       |  6 -----
 tests/qemu-iotests/211.out       |  7 ------
 tests/qemu-iotests/212.out       |  8 -------
 tests/qemu-iotests/213.out       |  9 -------
 tests/qemu-iotests/common.filter |  5 +++-
 34 files changed, 22 insertions(+), 219 deletions(-)
Signature · 1 line
2.17.0
author
#1 lore raw

RFC v2 1/4 docs: mention shared state protect for OOB

Out-Of-Band handlers need to protect shared state if there is any. Mention it in the document.

---
 docs/devel/qapi-code-gen.txt | 3 +++
 1 file changed, 3 insertions(+)
docs/devel/qapi-code-gen.txt +3 -0
index b9b6eabd08..aafc15f100 100644
@@ -680,6 +680,9 @@ OOB command handlers must satisfy the following conditions:
 - It does not invoke system calls that may block,
 - It does not access guest RAM that may block when userfaultfd is
   enabled for postcopy live migration.
+- It needs to protect possilbe shared states, since as long as a
+  command supports Out-Of-Band it means the handler can be run in
+  parallel with the same handler running in the other thread.
 
 If in doubt, do not implement OOB execution support.
 
Signature · 1 line
2.17.0
#2 lore raw

Re: [Qemu-devel] [RFC v2 1/4] docs: mention shared state protect for OOB

Quoted 14 lines · Peter Xu

Out-Of-Band handlers need to protect shared state if there is any. Mention it in the document.

---
  docs/devel/qapi-code-gen.txt | 3 +++
  1 file changed, 3 insertions(+)
docs/devel/qapi-code-gen.txt +0 -0
index b9b6eabd08..aafc15f100 100644

docs/devel/qapi-code-gen.txt OOB command handlers must satisfy the following conditions: · line 683

Quoted 4 lines
docs/devel/qapi-code-gen.txt +1 -0
@@ -680,6 +680,9 @@ OOB command handlers must satisfy the following conditions:
  - It does not invoke system calls that may block,
  - It does not access guest RAM that may block when userfaultfd is
    enabled for postcopy live migration.
+- It needs to protect possilbe shared states, since as long as a

s/possilbe/possible/
s/states/state/

or even 'protect any shared state'

Quoted 6 lines
docs/devel/qapi-code-gen.txt +2 -0
+  command supports Out-Of-Band it means the handler can be run in
+  parallel with the same handler running in the other thread.
 
  If in doubt, do not implement OOB execution support.
 
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
author
#3 lore raw

Re: [Qemu-devel] [RFC v2 1/4] docs: mention shared state protect for OOB

Quoted 23 lines · Eric Blake
Quoted 14 lines · Peter Xu

Out-Of-Band handlers need to protect shared state if there is any. Mention it in the document.

---
  docs/devel/qapi-code-gen.txt | 3 +++
  1 file changed, 3 insertions(+)
docs/devel/qapi-code-gen.txt +0 -0
index b9b6eabd08..aafc15f100 100644

docs/devel/qapi-code-gen.txt OOB command handlers must satisfy the following conditions: · line 683

Quoted 4 lines
docs/devel/qapi-code-gen.txt +1 -0
@@ -680,6 +680,9 @@ OOB command handlers must satisfy the following conditions:
  - It does not invoke system calls that may block,
  - It does not access guest RAM that may block when userfaultfd is
    enabled for postcopy live migration.
+- It needs to protect possilbe shared states, since as long as a

s/possilbe/possible/
s/states/state/

Quoted 1 line

or even 'protect any shared state'

Fixed.

Signature · 1 line
Peter Xu
author
#4 lore raw

RFC v2 2/4 tests: iotests: don't compare SHUTDOWN event

In reply to Peter Xu

This event is not really necessary. After OOB series it might affect the timing of the script so this event may or may not be there comparing to the old *.out results. Let's just filter it out.

Since some of the scripts are using qmp-pretty, we need some trick in the filtering script to make sure sed works for multiple lines to explicitly mask out this event.

CC John Snow <[email protected]>
CC Max Reitz <[email protected]>
CC Kevin Wolf <[email protected]>
---
 tests/qemu-iotests/060.out       |  1 -
 tests/qemu-iotests/067.out       |  5 ++++
 tests/qemu-iotests/071.out       |  2 --
 tests/qemu-iotests/081.out       |  1 -
 tests/qemu-iotests/087.out       |  6 -----
 tests/qemu-iotests/094.out       |  1 -
 tests/qemu-iotests/109.out       | 22 ------------------
 tests/qemu-iotests/117.out       |  1 -
 tests/qemu-iotests/119.out       |  1 -
 tests/qemu-iotests/120.out       |  1 -
 tests/qemu-iotests/127.out       |  1 -
 tests/qemu-iotests/140.out       |  1 -
 tests/qemu-iotests/143.out       |  1 -
 tests/qemu-iotests/156.out       |  1 -
 tests/qemu-iotests/176.out       |  8 -------
 tests/qemu-iotests/183.out       |  2 --
 tests/qemu-iotests/184.out       | 40 --------------------------------
 tests/qemu-iotests/185.out       |  5 ----
 tests/qemu-iotests/191.out       | 20 ----------------
 tests/qemu-iotests/195.out       | 20 ----------------
 tests/qemu-iotests/206.out       | 11 ---------
 tests/qemu-iotests/207.out       |  6 -----
 tests/qemu-iotests/210.out       |  6 -----
 tests/qemu-iotests/211.out       |  7 ------
 tests/qemu-iotests/212.out       |  8 -------
 tests/qemu-iotests/213.out       |  9 -------
 tests/qemu-iotests/common.filter |  5 +++-
 27 files changed, 9 insertions(+), 183 deletions(-)
tests/qemu-iotests/060.out +0 -1
index 25d5c3938b..6f06eee1f0 100644
@@ -419,5 +419,4 @@ QMP_VERSION
 write failed: Input/output error
 {"return": ""}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 *** done
tests/qemu-iotests/067.out +5 -0
index 2e71cff3ce..babf8343c6 100644
@@ -70,6 +70,7 @@ Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk -device vir
     }
 }
 
+
 === -drive/device_add and device_del ===
 
 Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk
@@ -141,6 +142,7 @@ Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk
     }
 }
 
+
 === drive_add/device_add and device_del ===
 
 Testing:
@@ -215,6 +217,7 @@ Testing:
     }
 }
 
+
 === blockdev_add/device_add and device_del ===
 
 Testing:
@@ -372,6 +375,7 @@ Testing:
     }
 }
 
+
 === Empty drive with -device and device_del ===
 
 Testing: -device virtio-scsi -device scsi-cd,id=cd0
@@ -410,4 +414,5 @@ Testing: -device virtio-scsi -device scsi-cd,id=cd0
     "return": {
     }
 }
+
 *** done
tests/qemu-iotests/071.out +0 -2
index 1d5e28d730..64b64526ab 100644
@@ -46,7 +46,6 @@ QMP_VERSION
 read failed: Input/output error
 {"return": ""}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Testing blkverify on existing block device ===
@@ -85,7 +84,6 @@ wrote 512/512 bytes at offset 0
 read failed: Input/output error
 {"return": ""}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 QEMU_PROG: Failed to flush the L2 table cache: Input/output error
 QEMU_PROG: Failed to flush the refcount block cache: Input/output error
 
tests/qemu-iotests/081.out +0 -1
index 2533c31c78..737b7d6f9b 100644
@@ -36,7 +36,6 @@ read 10485760/10485760 bytes at offset 0
 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": ""}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 == using quorum rewrite corrupted mode ==
tests/qemu-iotests/087.out +0 -6
index b1318c6ed6..936ea81b3c 100644
@@ -8,7 +8,6 @@ QMP_VERSION
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "'node-name' must be specified for the root node"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Duplicate ID ===
@@ -19,7 +18,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "node-name=disk is conflicting with a device id"}}
 {"error": {"class": "GenericError", "desc": "Duplicate node name"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === aio=native without O_DIRECT ===
@@ -29,7 +27,6 @@ QMP_VERSION
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "aio=native was specified, but it requires cache.direct=on, which was not specified."}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Encrypted image QCow ===
@@ -41,7 +38,6 @@ QMP_VERSION
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "Use of AES-CBC encrypted IMGFMT images is no longer supported in system emulators"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Encrypted image LUKS ===
@@ -53,7 +49,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Missing driver ===
@@ -64,6 +59,5 @@ QMP_VERSION
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "Parameter 'driver' is missing"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 *** done
tests/qemu-iotests/094.out +0 -1
index 665b630b08..19775ae1d0 100644
@@ -14,5 +14,4 @@ Formatting 'TEST_DIR/source.IMGFMT', fmt=IMGFMT size=67108864
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 *** done
tests/qemu-iotests/109.out +0 -22
index ad0ee6fb48..dc5cfde259 100644
@@ -18,7 +18,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -29,7 +28,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 1024, "offset": 1024, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 1024, "offset": 1024, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 1024, "offset": 1024, "speed": 0, "type": "mirror"}}
@@ -56,7 +54,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -67,7 +64,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 197120, "offset": 197120, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 197120, "offset": 197120, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 197120, "offset": 197120, "speed": 0, "type": "mirror"}}
@@ -94,7 +90,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -105,7 +100,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 327680, "offset": 327680, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 327680, "offset": 327680, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 327680, "offset": 327680, "speed": 0, "type": "mirror"}}
@@ -132,7 +126,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -143,7 +136,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 1024, "offset": 1024, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 1024, "offset": 1024, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 1024, "offset": 1024, "speed": 0, "type": "mirror"}}
@@ -170,7 +162,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -181,7 +172,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 65536, "offset": 65536, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 65536, "offset": 65536, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 65536, "offset": 65536, "speed": 0, "type": "mirror"}}
@@ -208,7 +198,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -219,7 +208,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 2560, "offset": 2560, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 2560, "offset": 2560, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 2560, "offset": 2560, "speed": 0, "type": "mirror"}}
@@ -245,7 +233,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -256,7 +243,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 2560, "offset": 2560, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 2560, "offset": 2560, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 2560, "offset": 2560, "speed": 0, "type": "mirror"}}
@@ -282,7 +268,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -293,7 +278,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 31457280, "offset": 31457280, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 31457280, "offset": 31457280, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 31457280, "offset": 31457280, "speed": 0, "type": "mirror"}}
@@ -319,7 +303,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -330,7 +313,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 327680, "offset": 327680, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 327680, "offset": 327680, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 327680, "offset": 327680, "speed": 0, "type": "mirror"}}
@@ -356,7 +338,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}}
 {"return": []}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": {}}
@@ -367,7 +348,6 @@ read 65536/65536 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 2048, "offset": 2048, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 2048, "offset": 2048, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 2048, "offset": 2048, "speed": 0, "type": "mirror"}}
@@ -390,7 +370,6 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 512, "offset": 512, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 512, "offset": 512, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 512, "offset": 512, "speed": 0, "type": "mirror"}}
@@ -406,7 +385,6 @@ Images are identical.
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 512, "offset": 512, "speed": 0, "type": "mirror"}}
 {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 512, "offset": 512, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "src"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 512, "offset": 512, "speed": 0, "type": "mirror"}}
tests/qemu-iotests/117.out +0 -1
index 851e214144..324805c962 100644
@@ -7,7 +7,6 @@ wrote 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": ""}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 No errors were found on the image.
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
tests/qemu-iotests/119.out +0 -1
index a8743b810e..9969d04b3a 100644
@@ -6,6 +6,5 @@ read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": ""}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 *** done
tests/qemu-iotests/120.out +0 -1
index 1af1aeb38d..219928a811 100644
@@ -6,7 +6,6 @@ wrote 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 {"return": ""}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 read 65536/65536 bytes at offset 0
tests/qemu-iotests/127.out +0 -1
index 83b522d4c2..b2d7c0cb99 100644
@@ -17,5 +17,4 @@ wrote 42/42 bytes at offset 0
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "mirror"}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "mirror"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 *** done
tests/qemu-iotests/140.out +0 -1
index 7295b3d975..ce2d65bc23 100644
@@ -11,5 +11,4 @@ read 65536/65536 bytes at offset 0
 can't open device nbd+unix:///drv?socket=TEST_DIR/nbd: Requested export not available
 server reported: export 'drv' not present
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 *** done
tests/qemu-iotests/143.out +0 -1
index 1c7fb45543..ca78c86d0c 100644
@@ -4,5 +4,4 @@ QA output created by 143
 can't open device nbd+unix:///no_such_export?socket=TEST_DIR/nbd: Requested export not available
 server reported: export 'no_such_export' not present
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 *** done
tests/qemu-iotests/156.out +0 -1
index 34c057b626..4f0e65840d 100644
@@ -41,7 +41,6 @@ read 65536/65536 bytes at offset 196608
 {"return": ""}
 
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 read 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
tests/qemu-iotests/176.out +0 -8
index f03a2e776c..ab63d5bdb0 100644
@@ -170,7 +170,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 wrote 196608/196608 bytes at offset 2147287040
 192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 wrote 131072/131072 bytes at offset 2147352576
@@ -207,7 +206,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {"sha256": HASH}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 === Test pass bitmap.1 ===
 
@@ -219,7 +217,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 wrote 196608/196608 bytes at offset 2147287040
 192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 wrote 131072/131072 bytes at offset 2147352576
@@ -257,7 +254,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {"sha256": HASH}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 === Test pass bitmap.2 ===
 
@@ -269,7 +265,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 wrote 196608/196608 bytes at offset 2147287040
 192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 wrote 131072/131072 bytes at offset 2147352576
@@ -307,7 +302,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {"sha256": HASH}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 === Test pass bitmap.3 ===
 
@@ -319,7 +313,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 wrote 196608/196608 bytes at offset 2147287040
 192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 wrote 131072/131072 bytes at offset 2147352576
@@ -354,5 +347,4 @@ QMP_VERSION
 {"return": {}}
 {"return": {"sha256": HASH}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 *** done
tests/qemu-iotests/183.out +0 -2
index 103fdc778b..73cace6e0f 100644
@@ -36,8 +36,6 @@ wrote 65536/65536 bytes at offset 1048576
 
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 No errors were found on the image.
 No errors were found on the image.
 wrote 65536/65536 bytes at offset 1048576
tests/qemu-iotests/184.out +0 -40
index 672650cde8..0dc080de79 100644
@@ -87,16 +87,6 @@ Testing:
     "return": {
     }
 }
-{
-    "timestamp": {
-        "seconds":  TIMESTAMP,
-        "microseconds":  TIMESTAMP
-    },
-    "event": "SHUTDOWN",
-    "data": {
-        "guest": false
-    }
-}
 
 
 == property changes in ThrottleGroup ==
@@ -166,16 +156,6 @@ Testing:
     "return": {
     }
 }
-{
-    "timestamp": {
-        "seconds":  TIMESTAMP,
-        "microseconds":  TIMESTAMP
-    },
-    "event": "SHUTDOWN",
-    "data": {
-        "guest": false
-    }
-}
 
 
 == object creation/set errors  ==
@@ -207,16 +187,6 @@ Testing:
     "return": {
     }
 }
-{
-    "timestamp": {
-        "seconds":  TIMESTAMP,
-        "microseconds":  TIMESTAMP
-    },
-    "event": "SHUTDOWN",
-    "data": {
-        "guest": false
-    }
-}
 
 
 == don't specify group ==
@@ -242,16 +212,6 @@ Testing:
     "return": {
     }
 }
-{
-    "timestamp": {
-        "seconds":  TIMESTAMP,
-        "microseconds":  TIMESTAMP
-    },
-    "event": "SHUTDOWN",
-    "data": {
-        "guest": false
-    }
-}
 
 
 *** done
tests/qemu-iotests/185.out +0 -5
index 4e0ca0dffa..dc4d8cc385 100644
@@ -21,7 +21,6 @@ Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 backing_file=TEST_DIR/t.q
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 524288, "speed": 65536, "type": "commit"}}
 
 === Start active commit job and exit qemu ===
@@ -31,7 +30,6 @@ Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 backing_file=TEST_DIR/t.q
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "commit"}}
 
 === Start mirror job and exit qemu ===
@@ -42,7 +40,6 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 size=67108864 cluster_size=65536 l
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "mirror"}}
 
 === Start backup job and exit qemu ===
@@ -53,7 +50,6 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 size=67108864 cluster_size=65536 l
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 65536, "speed": 65536, "type": "backup"}}
 
 === Start streaming job and exit qemu ===
@@ -63,7 +59,6 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 size=67108864 cluster_size=65536 l
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 524288, "speed": 65536, "type": "stream"}}
 No errors were found on the image.
 *** done
tests/qemu-iotests/191.out +0 -20
index 31a0c7d4c4..1e1479c6e4 100644
@@ -382,16 +382,6 @@ wrote 65536/65536 bytes at offset 1048576
     "return": {
     }
 }
-{
-    "timestamp": {
-        "seconds":  TIMESTAMP,
-        "microseconds":  TIMESTAMP
-    },
-    "event": "SHUTDOWN",
-    "data": {
-        "guest": false
-    }
-}
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
 virtual size: 64M (67108864 bytes)
@@ -799,16 +789,6 @@ wrote 65536/65536 bytes at offset 1048576
     "return": {
     }
 }
-{
-    "timestamp": {
-        "seconds":  TIMESTAMP,
-        "microseconds":  TIMESTAMP
-    },
-    "event": "SHUTDOWN",
-    "data": {
-        "guest": false
-    }
-}
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
 virtual size: 64M (67108864 bytes)
tests/qemu-iotests/195.out +0 -20
index 7613575c64..4f002a7248 100644
@@ -21,16 +21,6 @@ Testing: -drive if=none,file=TEST_DIR/t.IMGFMT,backing.node-name=mid
     "return": {
     }
 }
-{
-    "timestamp": {
-        "seconds":  TIMESTAMP,
-        "microseconds":  TIMESTAMP
-    },
-    "event": "SHUTDOWN",
-    "data": {
-        "guest": false
-    }
-}
 
 image: TEST_DIR/t.IMGFMT.mid
 file format: IMGFMT
@@ -58,16 +48,6 @@ Testing: -drive if=none,file=TEST_DIR/t.IMGFMT,node-name=top
     "return": {
     }
 }
-{
-    "timestamp": {
-        "seconds":  TIMESTAMP,
-        "microseconds":  TIMESTAMP
-    },
-    "event": "SHUTDOWN",
-    "data": {
-        "guest": false
-    }
-}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
tests/qemu-iotests/206.out +0 -11
index 042342ae9d..12a57259ce 100644
@@ -9,7 +9,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -29,7 +28,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -49,7 +47,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -69,7 +66,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -88,7 +84,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -142,7 +137,6 @@ QMP_VERSION
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "Cannot find device=this doesn't exist nor node_name=this doesn't exist"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Invalid sizes ===
@@ -155,7 +149,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Could not resize image: Image size cannot be negative"}}
 {"error": {"class": "GenericError", "desc": "Could not resize image: Failed to grow the L1 table: File too large"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Invalid version ===
@@ -167,7 +160,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater)"}}
 {"error": {"class": "GenericError", "desc": "Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater)"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Invalid backing file options ===
@@ -178,7 +170,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Backing file and preallocation cannot be used at the same time"}}
 {"error": {"class": "GenericError", "desc": "Backing format cannot be used without backing file"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Invalid cluster size ===
@@ -192,7 +183,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Cluster size must be a power of two between 512 and 2048k"}}
 {"error": {"class": "GenericError", "desc": "Could not resize image: Failed to grow the L1 table: File too large"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Invalid refcount width ===
@@ -204,6 +194,5 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Refcount width must be a power of two and may not exceed 64 bits"}}
 {"error": {"class": "GenericError", "desc": "Refcount width must be a power of two and may not exceed 64 bits"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 *** done
tests/qemu-iotests/207.out +0 -6
index 417deee970..6078dbf443 100644
@@ -7,7 +7,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}}
 file format: IMGFMT
@@ -24,7 +23,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}}
 file format: IMGFMT
@@ -34,7 +32,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}}
 file format: IMGFMT
@@ -45,7 +42,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "remote host key does not match host_key_check 'wrong'"}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}}
 file format: IMGFMT
@@ -56,7 +52,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "remote host key does not match host_key_check 'wrong'"}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_DIR/t.IMGFMT"}}
 file format: IMGFMT
@@ -70,6 +65,5 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "failed to open remote file '/this/is/not/an/existing/path': Failed opening remote file (libssh2 error code: -31)"}}
 {"error": {"class": "GenericError", "desc": "failed to authenticate using publickey authentication and the identities held by your ssh-agent"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 *** done
tests/qemu-iotests/210.out +0 -6
index 8198f8c829..9433ac0579 100644
@@ -9,7 +9,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "key-secret": "keysec0"}
 file format: IMGFMT
@@ -58,7 +57,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "key-secret": "keysec0"}
 file format: IMGFMT
@@ -106,7 +104,6 @@ QMP_VERSION
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "Cannot find device=this doesn't exist nor node_name=this doesn't exist"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Zero size ===
@@ -116,7 +113,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "key-secret": "keysec0"}
 file format: IMGFMT
@@ -131,7 +127,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "The requested file size is too large"}}
 {"error": {"class": "GenericError", "desc": "The requested file size is too large"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Resize image with invalid sizes ===
@@ -144,7 +139,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'size', expected: integer"}}
 {"error": {"class": "GenericError", "desc": "Parameter 'size' expects a >0 size"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "key-secret": "keysec0"}
 file format: IMGFMT
tests/qemu-iotests/211.out +0 -7
index 3247bbaa64..ec0fb0f65d 100644
@@ -9,7 +9,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -24,7 +23,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -39,7 +37,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -54,7 +51,6 @@ QMP_VERSION
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "Cannot find device=this doesn't exist nor node_name=this doesn't exist"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Zero size ===
@@ -64,7 +60,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -77,7 +72,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -92,6 +86,5 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Unsupported VDI image size (size is 0x8000000000000000, max supported is 0x1fffff8000000)"}}
 {"error": {"class": "GenericError", "desc": "Unsupported VDI image size (size is 0x1fffff8000001, max supported is 0x1fffff8000000)"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 *** done
tests/qemu-iotests/212.out +0 -8
index 587de6fad0..56b20921b3 100644
@@ -9,7 +9,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -23,7 +22,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -37,7 +35,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -50,7 +47,6 @@ QMP_VERSION
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "Cannot find device=this doesn't exist nor node_name=this doesn't exist"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Zero size ===
@@ -60,7 +56,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -73,7 +68,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -90,7 +84,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Image size is too large for this cluster size"}}
 {"error": {"class": "GenericError", "desc": "Image size is too large for this cluster size"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Invalid cluster size ===
@@ -106,6 +99,5 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Image size is too large for this cluster size"}}
 {"error": {"class": "GenericError", "desc": "Image size is too large for this cluster size"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 *** done
tests/qemu-iotests/213.out +0 -9
index 8e8fc29cbc..b672e83b1e 100644
@@ -9,7 +9,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -23,7 +22,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -37,7 +35,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -50,7 +47,6 @@ QMP_VERSION
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "Cannot find device=this doesn't exist nor node_name=this doesn't exist"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Zero size ===
@@ -60,7 +56,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -73,7 +68,6 @@ QMP_VERSION
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
@@ -89,7 +83,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Image size too large; max of 64TB"}}
 {"error": {"class": "GenericError", "desc": "Image size too large; max of 64TB"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Invalid block size ===
@@ -103,7 +96,6 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Block size must not exceed 268435456"}}
 {"error": {"class": "GenericError", "desc": "Block size must be a multiple of 1 MB"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Invalid log size ===
@@ -116,6 +108,5 @@ QMP_VERSION
 {"error": {"class": "GenericError", "desc": "Log size must be smaller than 4 GB"}}
 {"error": {"class": "GenericError", "desc": "Log size must be a multiple of 1 MB"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 *** done
tests/qemu-iotests/common.filter +4 -1
index f08ee55046..13fe5c33eb 100644
@@ -88,7 +88,10 @@ _filter_qmp()
     sed -e 's#\("\(micro\)\?seconds": \)[0-9]\+#\1 TIMESTAMP#g' \
         -e 's#^{"QMP":.*}$#QMP_VERSION#' \
         -e '/^    "QMP": {\s*$/, /^    }\s*$/ c\' \
-        -e '    QMP_VERSION'
+        -e '    QMP_VERSION' | \
+    tr '\n' '\r' | \
+    sed -e 's/{\s*"timestamp":\s*{\s*"seconds":\s*TIMESTAMP,\s*"microseconds":\s*TIMESTAMP\s*},\s*"event":\s*"SHUTDOWN",\s*"data":\s*{\s*"guest":\s*false\s*}\s*}\s//' | \
+    tr '\r' '\n'
 }
 
 # readline makes HMP command strings so long that git complains
Signature · 1 line
2.17.0
#5 lore raw

Re: [Qemu-devel] [RFC v2 2/4] tests: iotests: don't compare SHUTDOWN event

Quoted 3 lines · Peter Xu

This event is not really necessary. After OOB series it might affect the timing of the script so this event may or may not be there comparing to the old *.out results. Let's just filter it out.

This is worrying. Are you stating that the SHUTDOWN event can occur in a different order than it used to, or is it even worse that the SHUTDOWN event disappears altogether? If enabling OOB makes the SHUTDOWN event sometimes disappear, that's a regression that we should fix. If it just makes things occur in a different order, we need an explanation why that is okay.

Quoted 13 lines

Since some of the scripts are using qmp-pretty, we need some trick in the filtering script to make sure sed works for multiple lines to explicitly mask out this event.

CC John Snow <[email protected]>
CC Max Reitz <[email protected]>
CC Kevin Wolf <[email protected]>

---

+++ b/tests/qemu-iotests/067.out

tests/qemu-iotests/067.out Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk -device vir · line 74

Quoted 5 lines
tests/qemu-iotests/067.out +1 -0
@@ -70,6 +70,7 @@ Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk -device vir
      }
  }
 
+
  === -drive/device_add and device_del ===

Why is this blank line being added (multiple times in this file)? Is there something about the new filter that isn't quite stripping all the newlines when encountering the SHUTDOWN event in pretty form?

Aha - it's because test 067 is already doing a very similar filtering of events. Can we reduce the code duplication by promoting _filter_qmp_events from there into common.filter (as a separate patch)?

tests/qemu-iotests/common.filter _filter_qmp() · line 93

Quoted 9 lines
tests/qemu-iotests/common.filter +4 -1
+++ b/tests/qemu-iotests/common.filter
@@ -88,7 +88,10 @@ _filter_qmp()
      sed -e 's#\("\(micro\)\?seconds": \)[0-9]\+#\1 TIMESTAMP#g' \
          -e 's#^{"QMP":.*}$#QMP_VERSION#' \
          -e '/^    "QMP": {\s*$/, /^    }\s*$/ c\' \
-        -e '    QMP_VERSION'
+        -e '    QMP_VERSION' | \
+    tr '\n' '\r' | \
+    sed -e 's/{\s*"timestamp":\s*{\s*"seconds":\s*TIMESTAMP,\s*"microseconds":\s*TIMESTAMP\s*},\s*"event":\s*"SHUTDOWN",\s*"data":\s*{\s*"guest":\s*false\s*}\s*}\s//' | \

Really long line. This should do the same:

sed -e 's/\r{\(\r[^}]\|[^\r]\)*SHUTDOWN\(\r[^}]\|[^\r]\)*\r}//'

where the \(\r[^}]\|[^\r]\)* subpattern picks up all line breaks that do not end the current top-level {}, as well as any non-line breaks.

In fact, if you like my suggestion about promoting the filter from 67 into common.filter, we have two use cases: filter a single pretty-printed filter, and filter ANY pretty-printed filter. Maybe we do that as follows:

# $1 is a regex of event names to filter; leave empty to filter all _filter_qmp_events()

{
    fluff='\(\r[^}]\|[^\r]\)*'
    tr \\n \\r | \
    sed -e "s/$fluff"'"event": "'"$1$fluff\\r}//" \

| tr \\r \\n
}

at which point '_filter_qmp_events SHUTDOWN' works in this patch, and '_filter_qmp_events' works for 067. [Untested, but hopefully that gives you some ideas to play with]

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
author
#6 lore raw

Re: [Qemu-devel] [RFC v2 2/4] tests: iotests: don't compare SHUTDOWN event

Quoted 10 lines · Eric Blake
Quoted 3 lines · Peter Xu

This event is not really necessary. After OOB series it might affect the timing of the script so this event may or may not be there comparing to the old *.out results. Let's just filter it out.

This is worrying. Are you stating that the SHUTDOWN event can occur in a different order than it used to, or is it even worse that the SHUTDOWN event disappears altogether? If enabling OOB makes the SHUTDOWN event sometimes disappear, that's a regression that we should fix. If it just makes things occur in a different order, we need an explanation why that is okay.

The event might conditionally disappear in two of the 100+ qcow2 tests. And when it happens, it's not disappearing in all the testcases in the test but only some. For example, 087 might conditionally fail with this:

087 8s ... - output mismatch (see 087.out.bad)

home/peterx/git/qemu/bin/tests/qemu-iotests/087.out.bad 2018-06-01 18:53:44.267840928 +0800 renamed from home/peterx/git/qemu/tests/qemu-iotests/087.out 2018-06-01 18:44:22.378982462 +0800 +0 -2
@@ -8,7 +8,6 @@
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "'node-name' must be specified for the root node"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Duplicate ID ===
@@ -53,7 +52,6 @@
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Missing driver ===

Firstly, it does not fail every time I run "./check -qcow2 087", but it might fail like 1 out of 5. Then, it's not failing all the testcases in 087. For above example, it's failing "Missing ID and node-name" and "Encrypted image LUKS", and it can change too.

Quoted 23 lines
Quoted 14 lines

Since some of the scripts are using qmp-pretty, we need some trick in the filtering script to make sure sed works for multiple lines to explicitly mask out this event.

CC John Snow <[email protected]>
CC Max Reitz <[email protected]>
CC Kevin Wolf <[email protected]>

---

+++ b/tests/qemu-iotests/067.out

Review Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk -device vir · line 73

Quoted 4 lines
(quoted diff) +1 -0
@@ -70,6 +70,7 @@ Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk -device vir
      }
  }
+
  === -drive/device_add and device_del ===

Why is this blank line being added (multiple times in this file)? Is there something about the new filter that isn't quite stripping all the newlines when encountering the SHUTDOWN event in pretty form?

Quoted 3 lines

Aha - it's because test 067 is already doing a very similar filtering of events. Can we reduce the code duplication by promoting _filter_qmp_events from there into common.filter (as a separate patch)?

Yeah, can do.

Quoted 28 lines

Review _filter_qmp() · line 93

Quoted 10 lines
(quoted diff) +4 -1
+++ b/tests/qemu-iotests/common.filter
@@ -88,7 +88,10 @@ _filter_qmp()
      sed -e 's#\("\(micro\)\?seconds": \)[0-9]\+#\1 TIMESTAMP#g' \
          -e 's#^{"QMP":.*}$#QMP_VERSION#' \
          -e '/^    "QMP": {\s*$/, /^    }\s*$/ c\' \
-        -e '    QMP_VERSION'
+        -e '    QMP_VERSION' | \
+    tr '\n' '\r' | \
+    sed -e 's/{\s*"timestamp":\s*{\s*"seconds":\s*TIMESTAMP,\s*"microseconds":\s*TIMESTAMP\s*},\s*"event":\s*"SHUTDOWN",\s*"data":\s*{\s*"guest":\s*false\s*}\s*}\s//' | \

Really long line. This should do the same:

sed -e 's/\r{\(\r[^}]\|[^\r]\)*SHUTDOWN\(\r[^}]\|[^\r]\)*\r}//'

where the \(\r[^}]\|[^\r]\)* subpattern picks up all line breaks that do not end the current top-level {}, as well as any non-line breaks.

In fact, if you like my suggestion about promoting the filter from 67 into common.filter, we have two use cases: filter a single pretty-printed filter, and filter ANY pretty-printed filter. Maybe we do that as follows:

# $1 is a regex of event names to filter; leave empty to filter all _filter_qmp_events()

{
    fluff='\(\r[^}]\|[^\r]\)*'
    tr \\n \\r | \
    sed -e "s/$fluff"'"event": "'"$1$fluff\\r}//" \
Quoted 6 lines

| tr \\r \\n
}

at which point '_filter_qmp_events SHUTDOWN' works in this patch, and '_filter_qmp_events' works for 067. [Untested, but hopefully that gives you some ideas to play with]

Regex magic. Thanks for the lesson. :)

Signature · 1 line
Peter Xu
author
#7 lore raw

Re: [Qemu-devel] [RFC v2 2/4] tests: iotests: don't compare SHUTDOWN event

Quoted 37 lines · Peter Xu
Quoted 10 lines · Eric Blake
Quoted 3 lines · Peter Xu

This event is not really necessary. After OOB series it might affect the timing of the script so this event may or may not be there comparing to the old *.out results. Let's just filter it out.

This is worrying. Are you stating that the SHUTDOWN event can occur in a different order than it used to, or is it even worse that the SHUTDOWN event disappears altogether? If enabling OOB makes the SHUTDOWN event sometimes disappear, that's a regression that we should fix. If it just makes things occur in a different order, we need an explanation why that is okay.

The event might conditionally disappear in two of the 100+ qcow2 tests. And when it happens, it's not disappearing in all the testcases in the test but only some. For example, 087 might conditionally fail with this:

087 8s ... - output mismatch (see 087.out.bad)

home/peterx/git/qemu/bin/tests/qemu-iotests/087.out.bad 2018-06-01 18:53:44.267840928 +0800 renamed from home/peterx/git/qemu/tests/qemu-iotests/087.out 2018-06-01 18:44:22.378982462 +0800 +0 -2
@@ -8,7 +8,6 @@
 {"return": {}}
 {"error": {"class": "GenericError", "desc": "'node-name' must be specified for the root node"}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Duplicate ID ===
@@ -53,7 +52,6 @@
 {"return": {}}
 {"return": {}}
 {"return": {}}
-{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
 
 
 === Missing driver ===
Quoted 4 lines

Firstly, it does not fail every time I run "./check -qcow2 087", but it might fail like 1 out of 5. Then, it's not failing all the testcases in 087. For above example, it's failing "Missing ID and node-name" and "Encrypted image LUKS", and it can change too.

I think I found the problem underneath. I posted a standalone patch to fix that here:

[PATCH] monitor: postpone monitor_qmp_cleanup_queues

Please have a look first on that, then I'll see how I should proceed with this series. Thanks,

Signature · 1 line
Peter Xu
author
#8 lore raw

RFC v2 3/4 monitor: remove "x-oob", turn oob on by default

In reply to Peter Xu

There was a regression reported by Eric Auger before with OOB:

http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html

The fix is 951702f39c ("monitor: bind dispatch bh to iohandler context", 2018-04-10), which is in master already.

For the bug, we turned Out-Of-Band feature of monitors off for 2.12 release. Now we turn that on again after the 2.12 release.

This patch partly reverts be933ffc23 (monitor: new parameter "x-oob"), meanwhile turn it on again by default for non-MUX QMPs.

---
 include/monitor/monitor.h |  1 -
 monitor.c                 | 17 +----------------
 tests/qmp-test.c          |  2 +-
 vl.c                      |  5 -----
 4 files changed, 2 insertions(+), 23 deletions(-)
include/monitor/monitor.h +0 -1
index d6ab70cae2..0cb0538a31 100644
@@ -13,7 +13,6 @@ extern Monitor *cur_mon;
 #define MONITOR_USE_READLINE  0x02
 #define MONITOR_USE_CONTROL   0x04
 #define MONITOR_USE_PRETTY    0x08
-#define MONITOR_USE_OOB       0x10
 
 bool monitor_cur_is_qmp(void);
 
monitor.c +1 -16
index 46814af533..f6f74239ad 100644
@@ -4558,19 +4558,7 @@ void monitor_init(Chardev *chr, int flags)
 {
     Monitor *mon = g_malloc(sizeof(*mon));
     bool use_readline = flags & MONITOR_USE_READLINE;
-    bool use_oob = flags & MONITOR_USE_OOB;
-
-    if (use_oob) {
-        if (CHARDEV_IS_MUX(chr)) {
-            error_report("Monitor Out-Of-Band is not supported with "
-                         "MUX typed chardev backend");
-            exit(1);
-        }
-        if (use_readline) {
-            error_report("Monitor Out-Of-band is only supported by QMP");
-            exit(1);
-        }
-    }
+    bool use_oob = (flags & MONITOR_USE_CONTROL) && !CHARDEV_IS_MUX(chr);
 
     monitor_data_init(mon, false, use_oob);
 
@@ -4672,9 +4660,6 @@ QemuOptsList qemu_mon_opts = {
         },{
             .name = "pretty",
             .type = QEMU_OPT_BOOL,
-        },{
-            .name = "x-oob",
-            .type = QEMU_OPT_BOOL,
         },
         { /* end of list */ }
     },
tests/qmp-test.c +1 -1
index 88f867f8c0..c85a3964d9 100644
@@ -89,7 +89,7 @@ static void test_qmp_protocol(void)
     g_assert(q);
     test_version(qdict_get(q, "version"));
     capabilities = qdict_get_qlist(q, "capabilities");
-    g_assert(capabilities && qlist_empty(capabilities));
+    g_assert(capabilities);
     qobject_unref(resp);
 
     /* Test valid command before handshake */
vl.c +0 -5
index 038d7f8042..35e94a7032 100644
@@ -2402,11 +2402,6 @@ static int mon_init_func(void *opaque, QemuOpts *opts, Error **errp)
     if (qemu_opt_get_bool(opts, "pretty", 0))
         flags |= MONITOR_USE_PRETTY;
 
-    /* OOB is off by default */
-    if (qemu_opt_get_bool(opts, "x-oob", 0)) {
-        flags |= MONITOR_USE_OOB;
-    }
-
     chardev = qemu_opt_get(opts, "chardev");
     chr = qemu_chr_find(chardev);
     if (chr == NULL) {
Signature · 1 line
2.17.0
#9 lore raw

Re: [Qemu-devel] [RFC v2 3/4] monitor: remove "x-oob", turn oob on by default

Quoted 6 lines · Peter Xu

There was a regression reported by Eric Auger before with OOB:

   http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html

The fix is 951702f39c ("monitor: bind dispatch bh to iohandler context", 2018-04-10), which is in master already.

s/, which is in master already//

(when reading the git log, it can be assumed that any commit id referenced is already in master)

Quoted 15 lines

For the bug, we turned Out-Of-Band feature of monitors off for 2.12 release. Now we turn that on again after the 2.12 release.

This patch partly reverts be933ffc23 (monitor: new parameter "x-oob"), meanwhile turn it on again by default for non-MUX QMPs.

---
  include/monitor/monitor.h |  1 -
  monitor.c                 | 17 +----------------
  tests/qmp-test.c          |  2 +-
  vl.c                      |  5 -----
  4 files changed, 2 insertions(+), 23 deletions(-)
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
author
#10 lore raw

Re: [Qemu-devel] [RFC v2 3/4] monitor: remove "x-oob", turn oob on by default

Quoted 5 lines · Eric Blake
Quoted 4 lines · Peter Xu

There was a regression reported by Eric Auger before with OOB:

   http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html
Quoted 7 lines
Quoted 2 lines

The fix is 951702f39c ("monitor: bind dispatch bh to iohandler context", 2018-04-10), which is in master already.

s/, which is in master already//

(when reading the git log, it can be assumed that any commit id referenced is already in master)

Fixed.

Signature · 1 line
Peter Xu
#11 lore raw

Re: [Qemu-devel] [RFC v2 3/4] monitor: remove "x-oob", turn oob on by default

In reply to Peter Xu
Quoted 4 lines · Peter Xu

There was a regression reported by Eric Auger before with OOB:

http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html

Quoted 8 lines

The fix is 951702f39c ("monitor: bind dispatch bh to iohandler context", 2018-04-10), which is in master already.

For the bug, we turned Out-Of-Band feature of monitors off for 2.12 release. Now we turn that on again after the 2.12 release.

This patch partly reverts be933ffc23 (monitor: new parameter "x-oob"), meanwhile turn it on again by default for non-MUX QMPs.

Please add a brief explanation why OOB isn't turned on for MUX. Pointer to existing explanation would be fine.

Quoted 1 line
author
#12 lore raw

Re: [Qemu-devel] [RFC v2 3/4] monitor: remove "x-oob", turn oob on by default

Quoted 9 lines · Markus Armbruster
Quoted 7 lines · Peter Xu

There was a regression reported by Eric Auger before with OOB:

http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html

The fix is 951702f39c ("monitor: bind dispatch bh to iohandler context", 2018-04-10), which is in master already.

Quoted 8 lines
Quoted 5 lines

For the bug, we turned Out-Of-Band feature of monitors off for 2.12 release. Now we turn that on again after the 2.12 release.

This patch partly reverts be933ffc23 (monitor: new parameter "x-oob"), meanwhile turn it on again by default for non-MUX QMPs.

Please add a brief explanation why OOB isn't turned on for MUX. Pointer to existing explanation would be fine.

Sure.

Signature · 1 line
Peter Xu
author
#13 lore raw

RFC v2 4/4 Revert "tests: Add parameter to qtest_init_without_qmp_handshake"

In reply to Peter Xu

This reverts commit ddee57e0176f6ab53b13c6c97605b62737a8fd7a.

Meanwhile, revert one line from fa198ad9bdef to make sure qtest_init_without_qmp_handshake() will only pass in one parameter.

---
 tests/libqtest.h |  7 ++-----
 tests/libqtest.c | 10 ++++------
 tests/qmp-test.c |  4 ++--
 3 files changed, 8 insertions(+), 13 deletions(-)
tests/libqtest.h +2 -5
index cbe8df4473..811169453a 100644
@@ -56,14 +56,11 @@ QTestState *qtest_init(const char *extra_args);
 
 /**
  * qtest_init_without_qmp_handshake:
- * @use_oob: true to have the server advertise OOB support
- * @extra_args: other arguments to pass to QEMU.  CAUTION: these
- * arguments are subject to word splitting and shell evaluation.
+ * @extra_args: other arguments to pass to QEMU.
  *
  * Returns: #QTestState instance.
  */
-QTestState *qtest_init_without_qmp_handshake(bool use_oob,
-                                             const char *extra_args);
+QTestState *qtest_init_without_qmp_handshake(const char *extra_args);
 
 /**
  * qtest_quit:
tests/libqtest.c +4 -6
index 43fb97e035..027be0887d 100644
@@ -166,8 +166,7 @@ static const char *qtest_qemu_binary(void)
     return qemu_bin;
 }
 
-QTestState *qtest_init_without_qmp_handshake(bool use_oob,
-                                             const char *extra_args)
+QTestState *qtest_init_without_qmp_handshake(const char *extra_args)
 {
     QTestState *s;
     int sock, qmpsock, i;
@@ -200,13 +199,12 @@ QTestState *qtest_init_without_qmp_handshake(bool use_oob,
         command = g_strdup_printf("exec %s "
                                   "-qtest unix:%s,nowait "
                                   "-qtest-log %s "
-                                  "-chardev socket,path=%s,nowait,id=char0 "
-                                  "-mon chardev=char0,mode=control%s "
+                                  "-qmp unix:%s,nowait "
                                   "-machine accel=qtest "
                                   "-display none "
                                   "%s", qemu_binary, socket_path,
                                   getenv("QTEST_LOG") ? "/dev/fd/2" : "/dev/null",
-                                  qmp_socket_path, use_oob ? ",x-oob=on" : "",
+                                  qmp_socket_path,
                                   extra_args ?: "");
         execlp("/bin/sh", "sh", "-c", command, NULL);
         exit(1);
@@ -241,7 +239,7 @@ QTestState *qtest_init_without_qmp_handshake(bool use_oob,
 
 QTestState *qtest_init(const char *extra_args)
 {
-    QTestState *s = qtest_init_without_qmp_handshake(false, extra_args);
+    QTestState *s = qtest_init_without_qmp_handshake(extra_args);
 
     /* Read the QMP greeting and then do the handshake */
     qtest_qmp_discard_response(s, "");
tests/qmp-test.c +2 -2
index c85a3964d9..a6395363e5 100644
@@ -81,7 +81,7 @@ static void test_qmp_protocol(void)
     QList *capabilities;
     QTestState *qts;
 
-    qts = qtest_init_without_qmp_handshake(false, common_args);
+    qts = qtest_init_without_qmp_handshake(common_args);
 
     /* Test greeting */
     resp = qtest_qmp_receive(qts);
@@ -146,7 +146,7 @@ static void test_qmp_oob(void)
     QString *qstr;
     const char *cmd_id;
 
-    qts = qtest_init_without_qmp_handshake(true, common_args);
+    qts = qtest_init_without_qmp_handshake(common_args);
 
     /* Check the greeting message. */
     resp = qtest_qmp_receive(qts);
Signature · 1 line
2.17.0
#14 lore raw

Re: [Qemu-devel] [RFC v2 4/4] Revert "tests: Add parameter to qtest_init_without_qmp_handshake"

Quoted 10 lines · Peter Xu

This reverts commit ddee57e0176f6ab53b13c6c97605b62737a8fd7a.

Meanwhile, revert one line from fa198ad9bdef to make sure qtest_init_without_qmp_handshake() will only pass in one parameter.

---

+++ b/tests/libqtest.h

tests/libqtest.h QTestState *qtest_init(const char *extra_args); · line 59

Quoted 7 lines
tests/libqtest.h +1 -3
@@ -56,14 +56,11 @@ QTestState *qtest_init(const char *extra_args);
 
  /**
   * qtest_init_without_qmp_handshake:
- * @use_oob: true to have the server advertise OOB support
- * @extra_args: other arguments to pass to QEMU.  CAUTION: these
- * arguments are subject to word splitting and shell evaluation.
+ * @extra_args: other arguments to pass to QEMU.

The CAUTION message was a useful improvement, I don't think we should revert that part of the patch.

tests/libqtest.c QTestState *qtest_init_without_qmp_handshake(bool use_oob, · line 207

Quoted 13 lines
tests/libqtest.c +2 -3
@@ -200,13 +199,12 @@ QTestState *qtest_init_without_qmp_handshake(bool use_oob,
          command = g_strdup_printf("exec %s "
                                    "-qtest unix:%s,nowait "
                                    "-qtest-log %s "
-                                  "-chardev socket,path=%s,nowait,id=char0 "
-                                  "-mon chardev=char0,mode=control%s "
+                                  "-qmp unix:%s,nowait "
                                    "-machine accel=qtest "
                                    "-display none "
                                    "%s", qemu_binary, socket_path,
                                    getenv("QTEST_LOG") ? "/dev/fd/2" : "/dev/null",
-                                  qmp_socket_path, use_oob ? ",x-oob=on" : "",
+                                  qmp_socket_path,

I agree with your cover letter that you don't want to check in patch 3/4 as-is, as it temporarily breaks this test. But I disagree with your idea of squashing 3 and 4 into one patch, as having two separate reversion patches that both call out the primary commit that they are reverting is nicer than one patch that reverts two things at once. My suggestion: in patch 3, tweak this line to be:

qmp_socket_path, "",

so that the test will pass, then in patch 4, remove the useless "" parameter (a minor conflict resolution rather than a clean revert, but we already have that because of fa198ad9b, and I think it results in a nicer git commit history).

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
author
#15 lore raw

Re: [Qemu-devel] [RFC v2 4/4] Revert "tests: Add parameter to qtest_init_without_qmp_handshake"

Quoted 42 lines · Eric Blake
Quoted 10 lines · Peter Xu

This reverts commit ddee57e0176f6ab53b13c6c97605b62737a8fd7a.

Meanwhile, revert one line from fa198ad9bdef to make sure qtest_init_without_qmp_handshake() will only pass in one parameter.

---

+++ b/tests/libqtest.h

tests/libqtest.h QTestState *qtest_init(const char *extra_args); · line 58

Quoted 6 lines
tests/libqtest.h +1 -3
@@ -56,14 +56,11 @@ QTestState *qtest_init(const char *extra_args);
  /**
   * qtest_init_without_qmp_handshake:
- * @use_oob: true to have the server advertise OOB support
- * @extra_args: other arguments to pass to QEMU.  CAUTION: these
- * arguments are subject to word splitting and shell evaluation.
+ * @extra_args: other arguments to pass to QEMU.

The CAUTION message was a useful improvement, I don't think we should revert that part of the patch.

tests/libqtest.c QTestState *qtest_init_without_qmp_handshake(bool use_oob, · line 207

Quoted 13 lines
tests/libqtest.c +2 -3
@@ -200,13 +199,12 @@ QTestState *qtest_init_without_qmp_handshake(bool use_oob,
          command = g_strdup_printf("exec %s "
                                    "-qtest unix:%s,nowait "
                                    "-qtest-log %s "
-                                  "-chardev socket,path=%s,nowait,id=char0 "
-                                  "-mon chardev=char0,mode=control%s "
+                                  "-qmp unix:%s,nowait "
                                    "-machine accel=qtest "
                                    "-display none "
                                    "%s", qemu_binary, socket_path,
                                    getenv("QTEST_LOG") ? "/dev/fd/2" : "/dev/null",
-                                  qmp_socket_path, use_oob ? ",x-oob=on" : "",
+                                  qmp_socket_path,

I agree with your cover letter that you don't want to check in patch 3/4 as-is, as it temporarily breaks this test. But I disagree with your idea of squashing 3 and 4 into one patch, as having two separate reversion patches that both call out the primary commit that they are reverting is nicer than one patch that reverts two things at once. My suggestion: in patch 3, tweak this line to be:

Quoted 6 lines

qmp_socket_path, "",

so that the test will pass, then in patch 4, remove the useless "" parameter (a minor conflict resolution rather than a clean revert, but we already have that because of fa198ad9b, and I think it results in a nicer git commit history).

Will take your suggestion.

I'll wait a bit more to see what's the conclusion for "[PATCH]
monitor: postpone monitor_qmp_cleanup_queues" before I repost.

Thanks for the review.

Signature · 1 line
Peter Xu
author
#16 lore raw
In reply to Peter Xu
Quoted 11 lines · Peter Xu

Patch 1: some more comment suggested by Markus on Out-Of-Band handlers.

Patch 2: touch up iotests to make sure after enabling OOB the randomly generated SHUTDOWN event won't fail any tests. Without this change, iotests (raw) will success but iotests (qcow2) may fail 2 tests out of 100+. With this patch applied, all tests pass. Kevin, Max, please help have a look on this one.

Patch 3: revert the x-oob parameter, turn OOB on.

Quoted 8 lines

Patch 4: revert the x-oob parameter usage in test. We can consider squash this patch into patch 3 to make sure no test will break. However I kept it separate at least for review.

Tests passed:

- make check
- iotests on both raw and qcow2

Considering that I didn't get any objection in my RFC post for some time, I should be able to mark the whole series as non-RFC (which I forgot to change). Please treat them as non-RFC patches.

Signature · 1 line
Peter Xu