Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > On 10/01/2015 11:39 AM, Markus Armbruster wrote: > >>> I'm leaning towards A (calling self-inheritance a name collision is a >>> bit of a stretch in the first place; and leaving it untested until 16/46 >>> goes in doesn't hurt). >> >> Okay, A. it is. I pushed to branch qapi

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Eric Blake
On 10/01/2015 11:39 AM, Markus Armbruster wrote: >> I'm leaning towards A (calling self-inheritance a name collision is a >> bit of a stretch in the first place; and leaving it untested until 16/46 >> goes in doesn't hurt). > > Okay, A. it is. I pushed to branch qapi-next at > http://repo.or.cz/

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > On 10/01/2015 09:34 AM, Markus Armbruster wrote: > Do we have a test for the simpler case of a struct inheriting from itself? >>> >>> Not here, but in v5 16/46. That's because it asserts, but while it was >>> easy to fix up in the QAPISchema.check(), I did not find

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Eric Blake
On 10/01/2015 09:34 AM, Markus Armbruster wrote: >>> Do we have a test for the simpler case of a struct inheriting from >>> itself? >> >> Not here, but in v5 16/46. That's because it asserts, but while it was >> easy to fix up in the QAPISchema.check(), I did not find it worth the >> churn to fix

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > On 10/01/2015 05:51 AM, Markus Armbruster wrote: [...] >>> +++ b/tests/qapi-schema/flat-union-cycle.json >>> @@ -0,0 +1,8 @@ >>> +# Ensure that we have a sane error message for attempts at self-inheritance >>> +# This test currently fails because we don't permit a union base,

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > On 09/29/2015 04:21 PM, Eric Blake wrote: >> Expose some weaknesses in the generator: we don't always forbid >> the generation of structs that contain multiple members that map >> to the same C or QMP name. This has already been marked FIXME in >> qapi.py in commit d90675f,

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Eric Blake
On 10/01/2015 05:51 AM, Markus Armbruster wrote: >> +++ b/tests/qapi-schema/alternate-clash.json >> @@ -1,3 +1,8 @@ >> -# we detect C enum collisions in an alternate >> +# Alternate branch name collision >> +# Reject an alternate that would result in a collision in generated C >> +# names (this wo

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > Expose some weaknesses in the generator: we don't always forbid > the generation of structs that contain multiple members that map > to the same C or QMP name. This has already been marked FIXME in > qapi.py in commit d90675f, but having more tests will make sure > future pa

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Eric Blake
On 09/29/2015 04:21 PM, Eric Blake wrote: > Expose some weaknesses in the generator: we don't always forbid > the generation of structs that contain multiple members that map > to the same C or QMP name. This has already been marked FIXME in > qapi.py in commit d90675f, but having more tests will

[Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-09-30 Thread Eric Blake
Expose some weaknesses in the generator: we don't always forbid the generation of structs that contain multiple members that map to the same C or QMP name. This has already been marked FIXME in qapi.py in commit d90675f, but having more tests will make sure future patches produce desired behavior;