From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfC13-0005q4-KQ for qemu-devel@nongnu.org; Tue, 08 Aug 2017 17:26:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfC10-0006fK-C3 for qemu-devel@nongnu.org; Tue, 08 Aug 2017 17:26:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60928) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dfC10-0006eH-2D for qemu-devel@nongnu.org; Tue, 08 Aug 2017 17:26:14 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B97B9A9628 for ; Tue, 8 Aug 2017 21:26:12 +0000 (UTC) References: <20170808205327.8768-1-crosa@redhat.com> <20170808205327.8768-2-crosa@redhat.com> <2e9697af-a48f-9fb6-696f-c2a8d3aebb06@redhat.com> From: Cleber Rosa Message-ID: Date: Tue, 8 Aug 2017 17:26:02 -0400 MIME-Version: 1.0 In-Reply-To: <2e9697af-a48f-9fb6-696f-c2a8d3aebb06@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XTrMuBlK9AW3161oww7JaNvRJQiuEIUsi" Subject: Re: [Qemu-devel] [PATCH 1/1] QAPI schema: turn example commands/returns into proper JSON List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XTrMuBlK9AW3161oww7JaNvRJQiuEIUsi From: Cleber Rosa To: Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org Message-ID: Subject: Re: [PATCH 1/1] QAPI schema: turn example commands/returns into proper JSON References: <20170808205327.8768-1-crosa@redhat.com> <20170808205327.8768-2-crosa@redhat.com> <2e9697af-a48f-9fb6-696f-c2a8d3aebb06@redhat.com> In-Reply-To: <2e9697af-a48f-9fb6-696f-c2a8d3aebb06@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 >> --- >> qapi-schema.json | 9 ++++----- >> qapi/block-core.json | 32 ++++++++++++++++---------------- >> qapi/rocker.json | 5 +---- >> 3 files changed, 21 insertions(+), 25 deletions(-) >=20 >=20 >> +++ b/qapi-schema.json >> @@ -2000,8 +2000,7 @@ >> # "host": "127.0.0.1", >> # "channel-id": 0, >> # "tls": false >> -# }, >> -# [ ... more channels follow ... ] >> +# } >=20 > 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 th= e > documented example. But I guess we can cross that when we have an > automated test where it matters. >=20 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 >> # } >=20 > 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. >=20 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 w= e > are past -rc2, it's probably just as easy to save it for 2.11. Either = way, >=20 > Reviewed-by: Eric Blake >=20 Thanks for the prompt review! --=20 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 ] --XTrMuBlK9AW3161oww7JaNvRJQiuEIUsi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeruW64tGuU1eD+m7ZX6NM6XyCfMFAlmKLG8ACgkQZX6NM6Xy CfOb9xAAv7YoJknP1aUb4kqv9lUmjq48EW9qPgwudwIOHkLZa252vzrKjf9M1Xq1 9zPc/CQvMFGwChEFJVULKol8iGmvpkTKRvdHmwBMjy8vV+6FTcDAnzvG1q+lr4E3 o2Bqf8UxiWy4n91/FymrgNX5eAvcporBXzF2RxohRj07awCH+HbiBT0Sx6GxzJPd BZk8iwDI0OhUFeLF6twzuysmXDO7amRtCd1IXzQNLwBgPwc/hbLFrXlxO+v5ItYq Rt6hTX87IVU/YNqrXqMyp2tld/jpHsjNsVJmsPlq8cuDM44u7wRGgby6THnMmXBM oSr73KkDHLmazJA7MI95m395BnPSagckdjEk4HEZnucZ4kc2GtqT2ZbkMhIBU9kv y37+G4YiH+R4vSxCnDx4DQjLiXC9XiYRbIM96SPNaIACk5L6Hm1gfOPZZBOFneNx JtT2dwjopsen4eXFJBuPD76/GIewJGpr98kgpGSE6x3b2yjrSxEcVg0su6Ksb46j 174u9G7nCNMbgHBMPTcPhk6BwbDZhFssuePMATZGdEWcA9TqHT2dWpclteSaJjmB WPBwCHRvNUkcgSe2Ez3Fw7Jp18ao+19v5TYe+EXywu9xI9YsIrbPPLy59Qk24f85 YcMzIgY6C8FyR1gVp4oBX0UccL//hzWKw2EzaRDU5JrwvXtRdgk= =LTQG -----END PGP SIGNATURE----- --XTrMuBlK9AW3161oww7JaNvRJQiuEIUsi--