From: Cleber Rosa <crosa@redhat.com>
To: Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/1] QAPI schema: turn example commands/returns into proper JSON
Date: Tue, 8 Aug 2017 17:26:02 -0400 [thread overview]
Message-ID: <aaf5d10e-e9a7-cf1f-fde8-7dd6f58652bf@redhat.com> (raw)
In-Reply-To: <2e9697af-a48f-9fb6-696f-c2a8d3aebb06@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2558 bytes --]
On 08/08/2017 05:13 PM, Eric Blake wrote:
> On 08/08/2017 03:53 PM, Cleber Rosa wrote:
>> Most QMP commands and returns in the QAPI schema documentation
>> are valid "JSON-based wire format". A few examples are either
>> malformed, or contain comments.
>>
>> This fixes all the examples command and return data, making them
>> proper JSON, as they would be received and generated by QEMU's
>> QMP monitor.
>>
>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>> ---
>> qapi-schema.json | 9 ++++-----
>> qapi/block-core.json | 32 ++++++++++++++++----------------
>> qapi/rocker.json | 5 +----
>> 3 files changed, 21 insertions(+), 25 deletions(-)
>
>
>> +++ b/qapi-schema.json
>> @@ -2000,8 +2000,7 @@
>> # "host": "127.0.0.1",
>> # "channel-id": 0,
>> # "tls": false
>> -# },
>> -# [ ... more channels follow ... ]
>> +# }
>
> I still wonder if we want SOME sort of markup to make it obvious where
> we are compressing the example for the sake of brevity, where whatever
> we use to automate tests based on the docs would know how to recognize
> that the actual values given in reply to the test can be longer than the
> documented example. But I guess we can cross that when we have an
> automated test where it matters.
>
I wonder the same. Also, we seem to agree that it's a separate and more
complex problem, to be tackled later.
>> @@ -2039,7 +2038,7 @@
>> #
>> # -> { "execute": "query-balloon" }
>> # <- { "return": {
>> -# "actual": 1073741824,
>> +# "actual": 1073741824
>> # }
>
> I also suspect that test automation will have to do a lot of filtering,
> even for commands that don't need to be abbreviated, since some of the
> examples have pretty arbitrary numbers that will be difficult to
> reliably reproduce any particular number.
>
Yes. I'm already aware of a couple of use cases that will require
different types of comparison, including pretty relaxed ones. Expect
more about that in a later thread.
> This is a documentation fix, so it could still go in 2.10 - but since we
> are past -rc2, it's probably just as easy to save it for 2.11. Either way,
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
Thanks for the prompt review!
--
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]
[ 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3 ]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-08-08 21:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 20:53 [Qemu-devel] [PATCH 0/1] QAPI schema: turn example commands/returns into proper JSON Cleber Rosa
2017-08-08 20:53 ` [Qemu-devel] [PATCH 1/1] " Cleber Rosa
2017-08-08 21:13 ` Eric Blake
2017-08-08 21:26 ` Cleber Rosa [this message]
2017-08-14 15:31 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aaf5d10e-e9a7-cf1f-fde8-7dd6f58652bf@redhat.com \
--to=crosa@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).