qapi script: add check for duplicated key
authorWenchao Xia <wenchaoqemu@gmail.com>
Wed, 5 Mar 2014 02:44:32 +0000 (18:44 -0800)
committerLuiz Capitulino <lcapitulino@redhat.com>
Tue, 11 Mar 2014 13:07:41 +0000 (09:07 -0400)
commit4b35991a3bd5f9e03333d5b1bd4a7bcf9941aac5
tree5b41a70e6d38c54dbc357b60dfef9b643114208a
parentdad1fcab91bf101a02151069036d416367b59c5c
qapi script: add check for duplicated key

It is bad that same key was specified twice, especially when a union has
two branches with same condition. This patch can prevent it.

Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
scripts/qapi.py
tests/Makefile
tests/qapi-schema/duplicate-key.err [new file with mode: 0644]
tests/qapi-schema/duplicate-key.exit [new file with mode: 0644]
tests/qapi-schema/duplicate-key.json [new file with mode: 0644]
tests/qapi-schema/duplicate-key.out [new file with mode: 0644]