diff options
author | Markus Armbruster | 2019-09-13 22:13:41 +0200 |
---|---|---|
committer | Markus Armbruster | 2019-09-24 14:07:22 +0200 |
commit | 675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c (patch) | |
tree | e8dd67e031288e45927b128d21d687143b7aac6d /tests/qapi-schema | |
parent | qapi: Drop support for escape sequences other than \\ (diff) | |
download | qemu-675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c.tar.gz qemu-675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c.tar.xz qemu-675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c.zip |
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>
Diffstat (limited to 'tests/qapi-schema')
-rw-r--r-- | tests/qapi-schema/args-boxed-empty.err | 1 | ||||
-rw-r--r-- | tests/qapi-schema/args-boxed-empty.exit | 1 | ||||
-rw-r--r-- | tests/qapi-schema/args-boxed-empty.json | 3 | ||||
-rw-r--r-- | tests/qapi-schema/args-boxed-empty.out | 0 | ||||
-rw-r--r-- | tests/qapi-schema/qapi-schema-test.json | 2 | ||||
-rw-r--r-- | tests/qapi-schema/qapi-schema-test.out | 4 |
6 files changed, 6 insertions, 5 deletions
diff --git a/tests/qapi-schema/args-boxed-empty.err b/tests/qapi-schema/args-boxed-empty.err deleted file mode 100644 index 039603e85c..0000000000 --- a/tests/qapi-schema/args-boxed-empty.err +++ /dev/null @@ -1 +0,0 @@ -tests/qapi-schema/args-boxed-empty.json:3: Cannot use 'boxed' with empty type diff --git a/tests/qapi-schema/args-boxed-empty.exit b/tests/qapi-schema/args-boxed-empty.exit deleted file mode 100644 index d00491fd7e..0000000000 --- a/tests/qapi-schema/args-boxed-empty.exit +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/tests/qapi-schema/args-boxed-empty.json b/tests/qapi-schema/args-boxed-empty.json deleted file mode 100644 index 52717e065f..0000000000 --- a/tests/qapi-schema/args-boxed-empty.json +++ /dev/null @@ -1,3 +0,0 @@ -# 'boxed' requires a non-empty type -{ 'struct': 'Empty', 'data': {} } -{ 'command': 'foo', 'boxed': true, 'data': 'Empty' } diff --git a/tests/qapi-schema/args-boxed-empty.out b/tests/qapi-schema/args-boxed-empty.out deleted file mode 100644 index e69de29bb2..0000000000 --- a/tests/qapi-schema/args-boxed-empty.out +++ /dev/null diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json index 0fadb4ddd7..e6dbbbd328 100644 --- a/tests/qapi-schema/qapi-schema-test.json +++ b/tests/qapi-schema/qapi-schema-test.json @@ -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 diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qapi-schema-test.out index 5470a525f5..fb00a21996 100644 --- a/tests/qapi-schema/qapi-schema-test.out +++ b/tests/qapi-schema/qapi-schema-test.out @@ -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 |