Logo
Explore Help
Sign In
starred/qemu
1
0
Fork 0
You've already forked qemu
mirror of https://github.com/qemu/qemu.git synced 2026-07-09 18:16:33 +00:00
Code Issues 380 Packages Projects Releases Wiki Activity
Files
55d41b16eec5041bf94de9b687bf51a67fdf736d
qemu/tests/qapi-schema/enum-wrong-data.exit

2 lines
2 B
Plaintext
Raw Normal View History

qapi: Better error messages for bad enums 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 <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2015-05-04 09:05:04 -06:00
1
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 141ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API