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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 2/6] blockdev-test: Use single rather than double quotes in QMP
Date: Thu, 02 Oct 2014 18:24:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> 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)?

A whole bunch of tests.  Easily fixable.

No telling what out-of-tree stuff breaks.  Maybe even nothing.

Perhaps Anthony (cc'ed) can advise.

>> 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>

Thanks!



reply via email to

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