diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-03-15 13:56:54 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-03-16 07:13:02 +0100 |
commit | 1554a8fae984cad4704fb94a8cef3c9b42ef6185 (patch) | |
tree | 78d963a98ad801e050bfbd0c6943bd4e9fc30c0c /tests/qapi-schema/qapi-schema-test.json | |
parent | 700dc9f503c61cdd1180e9bf84a225105b22b227 (diff) | |
download | qemu-1554a8fae984cad4704fb94a8cef3c9b42ef6185.zip qemu-1554a8fae984cad4704fb94a8cef3c9b42ef6185.tar.gz qemu-1554a8fae984cad4704fb94a8cef3c9b42ef6185.tar.bz2 |
qapi: Have each QAPI schema declare its returns white-list
qapi.py has a hardcoded white-list of command names that may violate
the rules on permitted return types. Add a new pragma directive
'returns-whitelist', and use it to replace the hard-coded white-list.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1489582656-31133-6-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qapi-schema/qapi-schema-test.json')
-rw-r--r-- | tests/qapi-schema/qapi-schema-test.json | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json index 1719463..842ea3c 100644 --- a/tests/qapi-schema/qapi-schema-test.json +++ b/tests/qapi-schema/qapi-schema-test.json @@ -3,6 +3,13 @@ # This file is a stress test of supported qapi constructs that must # parse and compile correctly. +# Whitelists to permit QAPI rule violations +{ 'pragma': { + # Commands allowed to return a non-dictionary: + 'returns-whitelist': [ + 'guest-get-time', + 'guest-sync' ] } } + { 'struct': 'TestStruct', 'data': { 'integer': 'int', 'boolean': 'bool', 'string': 'str' } } |