qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, eblake@redhat.com, quintela@redhat.com
Subject: [Qemu-devel] [PATCH 1/7] tests/qapi-schema: Make test-qapi.py print arrays
Date: Fri,  1 Mar 2019 16:40:45 +0100	[thread overview]
Message-ID: <20190301154051.23317-2-armbru@redhat.com> (raw)
In-Reply-To: <20190301154051.23317-1-armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 tests/qapi-schema/qapi-schema-test.out | 6 ++++++
 tests/qapi-schema/test-qapi.py         | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qapi-schema-test.out
index d8aec17115..b59f4ca5a4 100644
--- a/tests/qapi-schema/qapi-schema-test.out
+++ b/tests/qapi-schema/qapi-schema-test.out
@@ -52,6 +52,9 @@ object UserDefTwo
     member dict1: UserDefTwoDict optional=False
 object UserDefThree
     member string0: str optional=False
+array UserDefOneList UserDefOne
+array UserDefTwoList UserDefTwo
+array TestStructList TestStruct
 object ForceArrays
     member unused1: UserDefOneList optional=False
     member unused2: UserDefTwoList optional=False
@@ -248,6 +251,7 @@ object __org.qemu_x-Union1
     member type: __org.qemu_x-Union1Kind optional=False
     tag type
     case __org.qemu_x-branch: q_obj_str-wrapper
+array __org.qemu_x-Union1List __org.qemu_x-Union1
 object __org.qemu_x-Struct2
     member array: __org.qemu_x-Union1List optional=False
 object __org.qemu_x-Union2
@@ -260,6 +264,8 @@ alternate __org.qemu_x-Alt
     case b: __org.qemu_x-Base
 event __ORG.QEMU_X-EVENT __org.qemu_x-Struct
    boxed=False
+array __org.qemu_x-EnumList __org.qemu_x-Enum
+array __org.qemu_x-StructList __org.qemu_x-Struct
 object q_obj___org.qemu_x-command-arg
     member a: __org.qemu_x-EnumList optional=False
     member b: __org.qemu_x-StructList optional=False
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index d592854601..d21fca01fc 100644
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -32,6 +32,12 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
             self._print_if(m.ifcond, indent=8)
         self._print_if(ifcond)
 
+    def visit_array_type(self, name, info, ifcond, element_type):
+        if not info:
+            return              # suppress built-in arrays
+        print('array %s %s' % (name, element_type.name))
+        self._print_if(ifcond)
+
     def visit_object_type(self, name, info, ifcond, base, members, variants):
         print('object %s' % name)
         if base:
-- 
2.17.2

  reply	other threads:[~2019-03-01 15:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01 15:40 [Qemu-devel] [PATCH 0/7] qapi: Code generation fixes Markus Armbruster
2019-03-01 15:40 ` Markus Armbruster [this message]
2019-03-01 15:45   ` [Qemu-devel] [PATCH 1/7] tests/qapi-schema: Make test-qapi.py print arrays Eric Blake
2019-03-04  8:17     ` Markus Armbruster
2019-03-01 15:40 ` [Qemu-devel] [PATCH 2/7] tests/qapi-schema: Cover conditional arrays Markus Armbruster
2019-03-01 15:46   ` Eric Blake
2019-03-01 15:40 ` [Qemu-devel] [PATCH 3/7] qapi: Pass file name to QAPIGen constructor instead of methods Markus Armbruster
2019-03-01 15:49   ` Eric Blake
2019-03-01 15:40 ` [Qemu-devel] [PATCH 4/7] qapi: Fix code generation for sub-modules in other directories Markus Armbruster
2019-03-01 16:00   ` Eric Blake
2019-03-04  8:26     ` Markus Armbruster
2019-03-01 15:40 ` [Qemu-devel] [PATCH 5/7] tests: Rename UserDefNativeListUnion to UserDefListUnion Markus Armbruster
2019-03-01 16:21   ` Eric Blake
2019-03-01 15:40 ` [Qemu-devel] [PATCH 6/7] tests/qapi-schema: Cover forward reference to sub-module Markus Armbruster
2019-03-01 16:22   ` Eric Blake
2019-03-01 15:40 ` [Qemu-devel] [PATCH 7/7] qapi: Fix array first used in a different module Markus Armbruster
2019-03-01 16:25   ` Eric Blake

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=20190301154051.23317-2-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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).