QAPI patches patches for 2021-07-15
-----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmDwKlYSHGFybWJydUBy ZWRoYXQuY29tAAoJEDhwtADrkYZTR2UP+wVKKbY09lvPlpb25DJe073EQspRqBqg hG8R4D82Xics3XMfAJ/QcCLmtEbYKT02BCyY069rP6fnD8ZS5DfUeiIXrXBajN5K eVFuIO/mV7qNvx8mWyvZ7X5BWoolEDxkx+TjFfu6ZgSDMFPCjKE729/IXpAPhHll lYW2j2RLHUJCTRq+IRv36E11LFKI1zDewA8q5NHARxIAyMBLT9UFKLpnw1Fe5V9C w/2aB1Uh78oAfB6BtazvTHVWT75pca/W/jzyMcdXMVaPCJrsODEvz6Gn50gKYG+L J7/m6ivjCjitLGk9H+h8TaC/Q/wIE36gMjd2XT4MhgxF14/bMZpX1xlMO8De9DMn XhONKRGtXYV9r2uLhc0C8kID6TEidIDBNXDrtX1hDL172AfJ+Q7fDTqqCSUk5C2j dbNQISOlEWTJ1moOiRPjozGrcap5/Z/CViUrrrWXvAZoHScEoHgX+3QyRYD0MfeC 0Q55kdx0Pu5W4qwg/EEBSzMUSy82VzJzgQTBmfmTxeEOqfUpfKu53ZNBqOO+1ZJd FsPzqnekNDcDrXtsg4TOuAnvShF8NW9nVnx3JeNUilcrjN0lIsnf7wrWUQQD66wA ZyboB9r/b0WdTQ9f+Zpi/i1ufEu9CSBseRrLac2noOOOrHLiURR8TYr3p6i6g0Fk jY9uCC/WnPto =dZGh -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-07-15' into staging QAPI patches patches for 2021-07-15 # gpg: Signature made Thu 15 Jul 2021 13:30:14 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2021-07-15: qapi: Fix crash on missing enum member name Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
9ad4c7c9b6
@ -455,8 +455,8 @@ def check_enum(expr: _JSONObject, info: QAPISourceInfo) -> None:
|
||||
for m in members]
|
||||
for member in members:
|
||||
source = "'data' member"
|
||||
member_name = member['name']
|
||||
check_keys(member, info, source, ['name'], ['if'])
|
||||
member_name = member['name']
|
||||
check_name_is_str(member_name, info, source)
|
||||
source = "%s '%s'" % (source, member_name)
|
||||
# Enum members may start with a digit
|
||||
|
2
tests/qapi-schema/enum-dict-no-name.err
Normal file
2
tests/qapi-schema/enum-dict-no-name.err
Normal file
@ -0,0 +1,2 @@
|
||||
enum-dict-no-name.json: In enum 'Enum':
|
||||
enum-dict-no-name.json:2: 'data' member misses key 'name'
|
2
tests/qapi-schema/enum-dict-no-name.json
Normal file
2
tests/qapi-schema/enum-dict-no-name.json
Normal file
@ -0,0 +1,2 @@
|
||||
# enum member lacking a name
|
||||
{ 'enum': 'Enum', 'data': [ {} ] }
|
0
tests/qapi-schema/enum-dict-no-name.out
Normal file
0
tests/qapi-schema/enum-dict-no-name.out
Normal file
Loading…
Reference in New Issue
Block a user