From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 2/7] tests/qapi-schema: Cover conditional arrays
Date: Tue, 5 Mar 2019 17:52:31 +0100 [thread overview]
Message-ID: <20190305165236.8389-3-armbru@redhat.com> (raw)
In-Reply-To: <20190305165236.8389-1-armbru@redhat.com>
Commit 967c885108f neglected to cover arrays of conditional types. Do
that now.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190301154051.23317-3-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
tests/qapi-schema/qapi-schema-test.json | 2 +-
tests/qapi-schema/qapi-schema-test.out | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json
index cb0857df52..70612f394e 100644
--- a/tests/qapi-schema/qapi-schema-test.json
+++ b/tests/qapi-schema/qapi-schema-test.json
@@ -236,5 +236,5 @@
{ 'event': 'TestIfEvent', 'data':
{ 'foo': 'TestIfStruct',
- 'bar': { 'type': 'TestIfEnum', 'if': 'defined(TEST_IF_EVT_BAR)' } },
+ 'bar': { 'type': ['TestIfEnum'], 'if': 'defined(TEST_IF_EVT_BAR)' } },
'if': 'defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)' }
diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qapi-schema-test.out
index b59f4ca5a4..97f671ca5f 100644
--- a/tests/qapi-schema/qapi-schema-test.out
+++ b/tests/qapi-schema/qapi-schema-test.out
@@ -325,9 +325,11 @@ command TestIfCmd q_obj_TestIfCmd-arg -> UserDefThree
if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
command TestCmdReturnDefThree None -> UserDefThree
gen=True success_response=True boxed=False oob=False preconfig=False
+array TestIfEnumList TestIfEnum
+ if ['defined(TEST_IF_ENUM)']
object q_obj_TestIfEvent-arg
member foo: TestIfStruct optional=False
- member bar: TestIfEnum optional=False
+ member bar: TestIfEnumList optional=False
if ['defined(TEST_IF_EVT_BAR)']
if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
event TestIfEvent q_obj_TestIfEvent-arg
--
2.17.2
next prev parent reply other threads:[~2019-03-05 16:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 16:52 [Qemu-devel] [PULL 0/7] QAPI patches for 2019-03-05 Markus Armbruster
2019-03-05 16:52 ` [Qemu-devel] [PULL 1/7] tests/qapi-schema: Make test-qapi.py print arrays Markus Armbruster
2019-03-05 16:52 ` Markus Armbruster [this message]
2019-03-05 16:52 ` [Qemu-devel] [PULL 3/7] qapi: Pass file name to QAPIGen constructor instead of methods Markus Armbruster
2019-03-05 16:52 ` [Qemu-devel] [PULL 4/7] qapi: Fix code generation for sub-modules in other directories Markus Armbruster
2019-03-05 16:52 ` [Qemu-devel] [PULL 5/7] tests: Rename UserDefNativeListUnion to UserDefListUnion Markus Armbruster
2019-03-05 16:52 ` [Qemu-devel] [PULL 6/7] tests/qapi-schema: Cover forward reference to sub-module Markus Armbruster
2019-03-05 16:52 ` [Qemu-devel] [PULL 7/7] qapi: Fix array first used in a different module Markus Armbruster
2019-03-05 21:06 ` [Qemu-devel] [PULL 0/7] QAPI patches for 2019-03-05 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190305165236.8389-3-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).