qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/6] blockdev-test: Use single rather than doubl


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/6] blockdev-test: Use single rather than double quotes in QMP
Date: Thu, 02 Oct 2014 09:24:26 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

On 10/02/2014 08:51 AM, Markus Armbruster wrote:
> QMP accepts both single and double quotes.  This is the only test
> using double quotes.  They need to be quoted in C strings.  Replace
> them by single quotes.

Ooh, the use of single quotes on input is undocumented, and a violation
of JSON. We always output double quotes, and I've been relying on
.json/.hx files using single quotes for QAPI vs. double quotes for QMP
examples.  What would break if we tightened up our input parser to
forbid non-JSON inputs and mandate that QMP use double quotes, bringing
us into compliance with our docs (docs/qmp/README)?

> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  tests/drive_del-test.c | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)

If we WANT to keep undocumented support for single quotes (and/or
document our extension to JSON), then this is fine; otherwise, I'd
prefer that we use double quotes in QMP.

But if we decide single quotes are tolerable,

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]