From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com, Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v6 03/15] qapi: Drop redundant flat-union-reverse-define test
Date: Wed, 7 Oct 2015 20:00:38 -0600 [thread overview]
Message-ID: <1444269650-4117-4-git-send-email-eblake@redhat.com> (raw)
In-Reply-To: <1444269650-4117-1-git-send-email-eblake@redhat.com>
As of commit 8c3f8e77, we test compilation of forward references
for a struct base type (UserDefOne), flat union base type
(UserDefUnionBase), and flat union branch type
(UserDefFlatUnion2). The only remaining forward reference being
tested for parsing in flat-union-reverse-define was a forward
enum declaration. Once we make sure that always compiles,
the smaller parse-only test is redundant and can be deleted.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
v6: new patch; could be hoisted earlier alongside subset B v7 3/14
---
tests/Makefile | 1 -
tests/qapi-schema/flat-union-reverse-define.err | 0
tests/qapi-schema/flat-union-reverse-define.exit | 1 -
tests/qapi-schema/flat-union-reverse-define.json | 17 -----------------
tests/qapi-schema/flat-union-reverse-define.out | 13 -------------
tests/qapi-schema/qapi-schema-test.json | 11 +++++++----
6 files changed, 7 insertions(+), 36 deletions(-)
delete mode 100644 tests/qapi-schema/flat-union-reverse-define.err
delete mode 100644 tests/qapi-schema/flat-union-reverse-define.exit
delete mode 100644 tests/qapi-schema/flat-union-reverse-define.json
delete mode 100644 tests/qapi-schema/flat-union-reverse-define.out
diff --git a/tests/Makefile b/tests/Makefile
index e3eb547..791e510 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -287,7 +287,6 @@ qapi-schema += flat-union-invalid-branch-key.json
qapi-schema += flat-union-invalid-discriminator.json
qapi-schema += flat-union-no-base.json
qapi-schema += flat-union-optional-discriminator.json
-qapi-schema += flat-union-reverse-define.json
qapi-schema += flat-union-string-discriminator.json
qapi-schema += funny-char.json
qapi-schema += ident-with-escape.json
diff --git a/tests/qapi-schema/flat-union-reverse-define.err b/tests/qapi-schema/flat-union-reverse-define.err
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/qapi-schema/flat-union-reverse-define.exit b/tests/qapi-schema/flat-union-reverse-define.exit
deleted file mode 100644
index 573541a..0000000
--- a/tests/qapi-schema/flat-union-reverse-define.exit
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/tests/qapi-schema/flat-union-reverse-define.json b/tests/qapi-schema/flat-union-reverse-define.json
deleted file mode 100644
index 648bbfe..0000000
--- a/tests/qapi-schema/flat-union-reverse-define.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{ 'union': 'TestUnion',
- 'base': 'TestBase',
- 'discriminator': 'enum1',
- 'data': { 'value1': 'TestTypeA',
- 'value2': 'TestTypeB' } }
-
-{ 'struct': 'TestBase',
- 'data': { 'enum1': 'TestEnum' } }
-
-{ 'enum': 'TestEnum',
- 'data': [ 'value1', 'value2' ] }
-
-{ 'struct': 'TestTypeA',
- 'data': { 'string': 'str' } }
-
-{ 'struct': 'TestTypeB',
- 'data': { 'integer': 'int' } }
diff --git a/tests/qapi-schema/flat-union-reverse-define.out b/tests/qapi-schema/flat-union-reverse-define.out
deleted file mode 100644
index a5a9134..0000000
--- a/tests/qapi-schema/flat-union-reverse-define.out
+++ /dev/null
@@ -1,13 +0,0 @@
-object :empty
-object TestBase
- member enum1: TestEnum optional=False
-enum TestEnum ['value1', 'value2']
-object TestTypeA
- member string: str optional=False
-object TestTypeB
- member integer: int optional=False
-object TestUnion
- base TestBase
- tag enum1
- case value1: TestTypeA
- case value2: TestTypeB
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json
index 27ad961..4e2d7c2 100644
--- a/tests/qapi-schema/qapi-schema-test.json
+++ b/tests/qapi-schema/qapi-schema-test.json
@@ -4,10 +4,9 @@
# parse and compile correctly.
# for testing enums
-{ 'enum': 'EnumOne',
- 'data': [ 'value1', 'value2', 'value3' ] }
{ 'struct': 'NestedEnumsOne',
- 'data': { 'enum1': 'EnumOne', '*enum2': 'EnumOne', 'enum3': 'EnumOne', '*enum4': 'EnumOne' } }
+ 'data': { 'enum1': 'EnumOne', # Intentional forward reference
+ '*enum2': 'EnumOne', 'enum3': 'EnumOne', '*enum4': 'EnumOne' } }
# An empty enum, although unusual, is currently acceptable
{ 'enum': 'MyEnum', 'data': [ ] }
@@ -20,7 +19,11 @@
# for testing nested structs
{ 'struct': 'UserDefOne',
'base': 'UserDefZero', # intentional forward reference
- 'data': { 'string': 'str', '*enum1': 'EnumOne' } }
+ 'data': { 'string': 'str',
+ '*enum1': 'EnumOne' } } # intentional forward reference
+
+{ 'enum': 'EnumOne',
+ 'data': [ 'value1', 'value2', 'value3' ] }
{ 'struct': 'UserDefZero',
'data': { 'integer': 'int' } }
--
2.4.3
next prev parent reply other threads:[~2015-10-08 2:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 2:00 [Qemu-devel] [PATCH v6 00/15] post-introspection cleanups, subset C Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 01/15] qapi: Move empty-enum to compile-time test Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 02/15] qapi: Drop redundant returns-int test Eric Blake
2015-10-08 2:00 ` Eric Blake [this message]
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 04/15] qapi: Use generated TestStruct machinery in tests Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 05/15] qapi: Provide nicer array names in introspection Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 06/15] qapi-introspect: Guarantee particular sorting Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 07/15] qapi: Change alternate layout to use 'type' Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 08/15] qapi: Simplify visiting of alternate types Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 09/15] qapi: Fix alternates that accept 'number' but not 'int' Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 10/15] qapi: Remove dead visitor code Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 11/15] qapi: Plug leaks in test-qmp-* Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 12/15] qapi: Simplify error testing " Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 13/15] qapi: Test failure in middle of array parse Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 14/15] qapi: More tests of input arrays Eric Blake
2015-10-08 2:00 ` [Qemu-devel] [PATCH v6 15/15] qapi: Simplify visits of optional fields Eric Blake
2015-10-16 15:23 ` [Qemu-devel] [PATCH v6 00/15] post-introspection cleanups, subset C 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=1444269650-4117-4-git-send-email-eblake@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=mdroth@linux.vnet.ibm.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).