<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/tests/qapi-schema/enum-max-member.err, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/tests/qapi-schema/enum-max-member.err?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/tests/qapi-schema/enum-max-member.err?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2015-12-17T07:21:28+00:00</updated>
<entry>
<title>qapi: Remove obsolete tests for MAX collision</title>
<updated>2015-12-17T07:21:28+00:00</updated>
<author>
<name>Eric Blake</name>
</author>
<published>2015-11-18T08:52:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=04e0639d4e77b6d55491d396c8aa13929ee8ed9a'/>
<id>urn:sha1:04e0639d4e77b6d55491d396c8aa13929ee8ed9a</id>
<content type='text'>
Now that we no longer collide with an implicit _MAX enum member,
we no longer need to reject it in the ad hoc parser, and can
remove several tests that are no longer needed.

Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
Message-Id: &lt;1447836791-369-24-git-send-email-eblake@redhat.com&gt;
[Commit message tweaked]
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>qapi: Better error messages for bad enums</title>
<updated>2015-05-05T16:39:00+00:00</updated>
<author>
<name>Eric Blake</name>
</author>
<published>2015-05-04T15:05:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=cf3935907b5df16f667d54ad6761c7e937dcf425'/>
<id>urn:sha1:cf3935907b5df16f667d54ad6761c7e937dcf425</id>
<content type='text'>
The previous commit demonstrated that the generator had several
flaws with less-than-perfect enums:
- an enum that listed the same string twice (or two variant
strings that map to the same C enumerator) ended up generating
an invalid C enum
- because the generator adds a _MAX terminator to each enum,
the use of an enum member 'max' can also cause this clash
- if an enum omits 'data', the generator left a python stack
trace rather than a graceful message
- an enum that used a non-array 'data' was silently accepted by
the parser
- an enum that used non-string members in the 'data' member
was silently accepted by the parser

Add check_enum to cover these situations, and update testcases
to match.  While valid .json files won't trigger any of these
cases, we might as well be nicer to developers that make a typo
while trying to add new QAPI code.

Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>qapi: Add some enum tests</title>
<updated>2015-05-05T16:39:00+00:00</updated>
<author>
<name>Eric Blake</name>
</author>
<published>2015-05-04T15:05:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ad11dbb93752ffd4bd1d5f31da7e2d9c40a68e8a'/>
<id>urn:sha1:ad11dbb93752ffd4bd1d5f31da7e2d9c40a68e8a</id>
<content type='text'>
Demonstrate that the qapi generator doesn't deal well with enums
that aren't up to par. Later patches will update the expected
results as the generator is made stricter.

Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
</content>
</entry>
</feed>
