<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/tests/qapi-schema/enum-dict-no-name.json, 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-dict-no-name.json?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/tests/qapi-schema/enum-dict-no-name.json?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2021-07-15T10:56:41+00:00</updated>
<entry>
<title>qapi: Fix crash on missing enum member name</title>
<updated>2021-07-15T10:56:41+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2021-06-16T07:21:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a0c7b99bf75d85b616fa219a7d866fc72970f327'/>
<id>urn:sha1:a0c7b99bf75d85b616fa219a7d866fc72970f327</id>
<content type='text'>
New test case enum-dict-no-name.json crashes:

    $ python3 scripts/qapi-gen.py tests/qapi-schema/enum-dict-no-name.json
    Traceback (most recent call last):
    [...]
      File "/work/armbru/qemu/scripts/qapi/expr.py", line 458, in check_enum
	member_name = member['name']
    KeyError: 'name'

Root cause: we try to retrieve member 'name' before we check for
missing members.  With that fixed, we get the expected error "'data'
member misses key 'name'".

Fixes: 0825f62c842f2c07c5471391c6d7fd3f4fe83732
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Message-Id: &lt;20210616072121.626431-1-armbru@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
</feed>
