iotests: Include QMP input in .out files

We generally include relevant HMP input in .out files, by virtue of
the fact that HMP echoes its input.  But QMP does not, so we have to
explicitly inject it in the output stream (appropriately filtered to
keep the tests passing), in order to make it easier to read .out files
to see what behavior is being tested (especially true where the output
file is a sequence of {'return': {}}).

Suggested-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20191114213415.23499-4-eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
Eric Blake 2019-11-14 15:34:14 -06:00
parent f3923a72f1
commit a98b1a1fef
23 changed files with 285 additions and 0 deletions

View file

@ -8,6 +8,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t
Formatting 'TEST_DIR/t.IMGFMT.ovl2', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.mid
wrote 65536/65536 bytes at offset 1048576
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
{ 'execute': 'qmp_capabilities' }
{
"return": {
}
@ -15,6 +16,7 @@ wrote 65536/65536 bytes at offset 1048576
=== Perform commit job ===
{ 'execute': 'block-commit', 'arguments': { 'job-id': 'commit0', 'device': 'top', 'base':'TEST_DIR/t.IMGFMT.base', 'top': 'TEST_DIR/t.IMGFMT.mid' } }
{
"timestamp": {
"seconds": TIMESTAMP,
@ -102,6 +104,7 @@ wrote 65536/65536 bytes at offset 1048576
=== Check that both top and top2 point to base now ===
{ 'execute': 'query-named-block-nodes' }
{
"return": [
{
@ -378,6 +381,7 @@ wrote 65536/65536 bytes at offset 1048576
}
]
}
{ 'execute': 'quit' }
{
"return": {
}
@ -415,6 +419,7 @@ Formatting 'TEST_DIR/t.IMGFMT.ovl2', fmt=IMGFMT size=67108864 backing_file=TEST_
Formatting 'TEST_DIR/t.IMGFMT.ovl3', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.ovl2
wrote 65536/65536 bytes at offset 1048576
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
{ 'execute': 'qmp_capabilities' }
{
"return": {
}
@ -422,6 +427,7 @@ wrote 65536/65536 bytes at offset 1048576
=== Perform commit job ===
{ 'execute': 'block-commit', 'arguments': { 'job-id': 'commit0', 'device': 'top', 'base':'TEST_DIR/t.IMGFMT.base', 'top': 'TEST_DIR/t.IMGFMT.mid' } }
{
"timestamp": {
"seconds": TIMESTAMP,
@ -509,6 +515,7 @@ wrote 65536/65536 bytes at offset 1048576
=== Check that both top and top2 point to base now ===
{ 'execute': 'query-named-block-nodes' }
{
"return": [
{
@ -796,6 +803,7 @@ wrote 65536/65536 bytes at offset 1048576
}
]
}
{ 'execute': 'quit' }
{
"return": {
}