[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!
- [Qemu-devel] [PATCH 0/6] Improve drive_del test coverage, Markus Armbruster, 2014/10/02
- [Qemu-devel] [PATCH 4/6] blockdev-test: Simplify by using g_assert_cmpstr(), Markus Armbruster, 2014/10/02
- [Qemu-devel] [PATCH 2/6] blockdev-test: Use single rather than double quotes in QMP, Markus Armbruster, 2014/10/02
- [Qemu-devel] [PATCH 5/6] blockdev-test: Factor out some common code into helpers, Markus Armbruster, 2014/10/02
- [Qemu-devel] [PATCH 6/6] blockdev-test: Test device_del after drive_del, Markus Armbruster, 2014/10/02
- [Qemu-devel] [PATCH 3/6] blockdev-test: Clean up bogus drive_add argument, Markus Armbruster, 2014/10/02
- [Qemu-devel] [PATCH 1/6] drive_del-test: Merge of qdev-monitor-test, blockdev-test, Markus Armbruster, 2014/10/02