[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v2 2/7] qapi: Allow true, false and null in
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [RFC PATCH v2 2/7] qapi: Allow true, false and null in schema json |
Date: |
Tue, 20 May 2014 13:20:56 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 05/20/2014 03:07 AM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> scripts/qapi.py | 24 +++++++++++++++++-------
> 1 file changed, 17 insertions(+), 7 deletions(-)
I applied this patch and tried to break things.
Pre-patch,
{ 'random': tru } => foo.json:1:13: Stray "t"
{ 'random': true } => foo.json:1:13: Stray "t"
{ 'random': truest } => foo.json:1:13: Stray "t"
Post-patch,
{ 'random': tru } => foo.json:1:14: Stray "r"
{ 'random': true } => accepted
{ 'random': truest } => foo.json:1:17: Stray "s"
Not ideal that you are reporting a different stray character based on
how much (1 or 4 bytes) that you tentatively already consumed. Better
might be to report a stray word (all characters until the next
whitespace, starting at the first bare character rather than mid-word).
Are these cases tested in 3/7?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [RFC PATCH v2 0/7] qapi: Specify default value for optional argument in schema json, Fam Zheng, 2014/05/20
- [Qemu-devel] [RFC PATCH v2 1/7] qapi: Allow decimal values, Fam Zheng, 2014/05/20
- [Qemu-devel] [RFC PATCH v2 2/7] qapi: Allow true, false and null in schema json, Fam Zheng, 2014/05/20
- Re: [Qemu-devel] [RFC PATCH v2 2/7] qapi: Allow true, false and null in schema json,
Eric Blake <=
- [Qemu-devel] [RFC PATCH v2 4/7] qapi: Add c_val(t, val) for int, Fam Zheng, 2014/05/20
- [Qemu-devel] [RFC PATCH v2 5/7] qapi: Add @arg property dictionary syntax, Fam Zheng, 2014/05/20
- [Qemu-devel] [RFC PATCH v2 6/7] qapi: Initialize argument value in generated code if has 'default', Fam Zheng, 2014/05/20
- [Qemu-devel] [RFC PATCH v2 3/7] tests: Add decimal test cases for qapi-schema, Fam Zheng, 2014/05/20
- [Qemu-devel] [RFC PATCH v2 7/7] qmp: Convert block-commit speed to arg property dict, Fam Zheng, 2014/05/20
- Re: [Qemu-devel] [RFC PATCH v2 0/7] qapi: Specify default value for optional argument in schema json, Fam Zheng, 2014/05/20
- Re: [Qemu-devel] [RFC PATCH v2 0/7] qapi: Specify default value for optional argument in schema json, Eric Blake, 2014/05/20