This website requires JavaScript.
Explore
Help
Sign In
mirrors
/
qemu
Watch
1
Star
0
Fork
0
You've already forked qemu
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
101420b886
qemu
/
tests
/
qapi-schema
/
args-int.json
3 lines
101 B
JSON
Raw
Normal View
History
Unescape
Escape
qapi: More rigourous checking of types Now that we know every expression is valid with regards to its keys, we can add further tests that those keys refer to valid types. With this patch, all uses of a type (the 'data': of command, type, union, alternate, and event; the 'returns': of command; the 'base': of type and union) must resolve to an appropriate subset of metatypes declared by the current qapi parse; this includes recursing into each member of a data dictionary. Dealing with '**' and nested anonymous structs will be done in later patches. Update the testsuite to match improved output. 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 18:05:21 +03:00
#
w
e
r
e
j
e
c
t
c
o
m
m
a
n
d
s
w
h
e
r
e
d
a
t
a
i
s
n
o
t
a
n
a
r
r
a
y
o
r
c
o
m
p
l
e
x
t
y
p
e
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>
2015-05-04 18:05:20 +03:00
{
'
c
o
m
m
a
n
d
'
:
'
o
o
p
s
'
,
'
d
a
t
a
'
:
'
i
n
t
'
}
Reference in New Issue
Copy Permalink