qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v12 34/36] qapi: Add positive tests to qapi-sche


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v12 34/36] qapi: Add positive tests to qapi-schema-test
Date: Fri, 20 Nov 2015 15:49:45 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/18/2015 01:53 AM, Eric Blake wrote:
> Add positive tests to qapi-schema-test for things that were
> made possible by recent patches but which caused compile errors
> due to collisions prior to that point.  The focus is mainly on
> collisions due to names we have reserved for qapi, even though
> it is unlikely that anyone will want to abuse these names in
> actual .json files.
> 
> The added tests includes:
> Use of a member name ending in 'Kind' or 'List' [1, 3]

Violates our coding convention of all lower case, so not worth testing.

> Use of a type name starting with 'has_' [1, 4]

Ditto.

> Use of a type named 'u' [1, 5]

Ditto.

> Use of a union branch name of 'u' [2, 5]
> Use of a union branch name starting with 'has_' [2, 4]

Leaving just these two feels pretty weak.  I think I'll just drop this
patch from my queue entirely (it was great at proving that recent layout
improvements worked, but it's not the end of the world to lose it
entirely, especially now that v13 is starting to enforce naming
conventions except for a few whitelisted names, and I don't want to make
the whitelist longer just for the testsuite).

> 
> [1] Never broken, but could break if reservations are too strict
> [2] Broken prior to commit e4ba22b
> [3] See reservations in commit 4dc2e69 and 255960d
> [4] See reservations in commit 9fb081e
> [5] See reservation in commit 5e59baf
> 
> Not worth testing here: we no longer have a collision with a
> member named 'base' (commit ddf2190), with a branch named
> 'type' (commit e4ba22b), or with an alternate member named
> 'max' (previous commits); these names were more accidental
> namespace pollutions than intentional reservations.
> 
> Signed-off-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]