mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qapi: Permit 'boxed' with empty type
We reject empty types with 'boxed': true. We don't really need that to work, but making it work is actually simpler than rejecting it, so do that. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-9-armbru@redhat.com>
This commit is contained in:
parent
9b4416bfc1
commit
675b214bc6
11 changed files with 19 additions and 25 deletions
|
@ -1 +0,0 @@
|
|||
tests/qapi-schema/args-boxed-empty.json:3: Cannot use 'boxed' with empty type
|
|
@ -1 +0,0 @@
|
|||
1
|
|
@ -1,3 +0,0 @@
|
|||
# 'boxed' requires a non-empty type
|
||||
{ 'struct': 'Empty', 'data': {} }
|
||||
{ 'command': 'foo', 'boxed': true, 'data': 'Empty' }
|
|
@ -149,6 +149,7 @@
|
|||
{ 'command': 'guest-sync', 'data': { 'arg': 'any' }, 'returns': 'any' }
|
||||
{ 'command': 'boxed-struct', 'boxed': true, 'data': 'UserDefZero' }
|
||||
{ 'command': 'boxed-union', 'data': 'UserDefListUnion', 'boxed': true }
|
||||
{ 'command': 'boxed-empty', 'boxed': true, 'data': 'Empty1' }
|
||||
|
||||
# Smoke test on out-of-band and allow-preconfig-test
|
||||
{ 'command': 'test-flags-command', 'allow-oob': true, 'allow-preconfig': true }
|
||||
|
@ -181,6 +182,7 @@
|
|||
'data': { 'a' : 'EventStructOne', 'b' : 'str', '*c': 'str', '*enum3': 'EnumOne' } }
|
||||
{ 'event': 'EVENT_E', 'boxed': true, 'data': 'UserDefZero' }
|
||||
{ 'event': 'EVENT_F', 'boxed': true, 'data': 'UserDefFlatUnion' }
|
||||
{ 'event': 'EVENT_G', 'boxed': true, 'data': 'Empty1' }
|
||||
|
||||
# test that we correctly compile downstream extensions, as well as munge
|
||||
# ticklish names
|
||||
|
|
|
@ -221,6 +221,8 @@ command boxed-struct UserDefZero -> None
|
|||
gen=True success_response=True boxed=True oob=False preconfig=False
|
||||
command boxed-union UserDefListUnion -> None
|
||||
gen=True success_response=True boxed=True oob=False preconfig=False
|
||||
command boxed-empty Empty1 -> None
|
||||
gen=True success_response=True boxed=True oob=False preconfig=False
|
||||
command test-flags-command None -> None
|
||||
gen=True success_response=True boxed=False oob=True preconfig=True
|
||||
object UserDefOptions
|
||||
|
@ -254,6 +256,8 @@ event EVENT_E UserDefZero
|
|||
boxed=True
|
||||
event EVENT_F UserDefFlatUnion
|
||||
boxed=True
|
||||
event EVENT_G Empty1
|
||||
boxed=True
|
||||
enum __org.qemu_x-Enum
|
||||
member __org.qemu_x-value
|
||||
object __org.qemu_x-Base
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue