diff options
author | Eric Blake <eblake@redhat.com> | 2015-05-04 09:05:20 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-05-05 18:39:01 +0200 |
commit | 0d8b9fb5f296a96723d98a45a6a00bfd4e45e1b9 (patch) | |
tree | 23069277c1b7f5b14582eda0417632d8b15b21d8 /tests/Makefile | |
parent | d708cdbe8792a55f53e90c1c787e871d527e8d4b (diff) |
qapi: Add some type check tests
Demonstrate that the qapi generator silently parses confusing
types, which may cause other errors later on. Later patches
will update the expected results as the generator is made stricter.
Most of the new tests focus on blatant errors. But
returns-whitelist is a case where we have historically allowed
returning something other than a JSON object from particular
commands; we have to keep that behavior to avoid breaking clients,
but it would be nicer to avoid adding such commands in the future,
because any return that is not an (array of) object cannot be
easily extended if future qemu wants to return additional
information. The QMP protocol already documents that clients
should ignore unknown dictionary keys, but does not require
clients to have to handle more than one type of JSON object.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/Makefile')
-rw-r--r-- | tests/Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/Makefile b/tests/Makefile index 64e678502c..e2a3bd349e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -215,10 +215,14 @@ check-qapi-schema-y := $(addprefix tests/qapi-schema/, \ double-type.json bad-base.json bad-type-bool.json bad-type-int.json \ bad-type-dict.json double-data.json unknown-expr-key.json \ redefined-type.json redefined-command.json redefined-builtin.json \ - redefined-event.json command-int.json event-max.json \ + redefined-event.json command-int.json bad-data.json event-max.json \ type-bypass.json type-bypass-no-gen.json type-bypass-bad-gen.json \ - missing-colon.json missing-comma-list.json \ - missing-comma-object.json non-objects.json \ + data-array-empty.json data-array-unknown.json data-int.json \ + data-unknown.json data-member-unknown.json data-member-array.json \ + data-member-array-bad.json returns-array-bad.json returns-int.json \ + returns-unknown.json returns-alternate.json returns-whitelist.json \ + missing-colon.json missing-comma-list.json missing-comma-object.json \ + nested-struct-data.json nested-struct-returns.json non-objects.json \ qapi-schema-test.json quoted-structural-chars.json \ trailing-comma-list.json trailing-comma-object.json \ unclosed-list.json unclosed-object.json unclosed-string.json \ |