aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-06-18 13:32:39 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-06-18 13:32:39 +0100
commit8ffe756da0481233e1bd518b2b16489f51856292 (patch)
tree745088c99ef8605b0e11b9fae2a720307f7705d1 /tests/qapi-schema
parent1b58f5a7f6fbe811cc486cd5786483bad5d51bbf (diff)
parente1d4210c3a50059a3889cedc44a8aa193fa63d7d (diff)
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-06-18' into staging
QAPI patches # gpg: Signature made Thu Jun 18 13:20:00 2015 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-qapi-2015-06-18: qapi-types: Bury code dead since commit 6b5abc7 qapi-types: Split generate_fwd_builtin() off generate_fwd_struct() qapi-types: Drop unused members parameters qapi-types: Don't filter out expressions with 'gen' qapi: Catch and reject flat union branch of array type tests/qapi-schema: New flat union array branch test case qapi: Better separate the different kinds of helpers qapi: Move exprs checking from parse_schema() to check_exprs() qapi: Fix to reject stray 't', 'f' and 'n' qapi: Simplify inclusion cycle detection qapi: Fix file name in error messages for included files qapi: Improve a couple of confusing variable names qapi: Eliminate superfluous QAPISchema attribute input_dir qapi: Drop bogus command from docs MAINTAINERS: Fix up QAPI and QAPI schema file patterns Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qapi-schema')
-rw-r--r--tests/qapi-schema/flat-union-array-branch.err1
-rw-r--r--tests/qapi-schema/flat-union-array-branch.exit1
-rw-r--r--tests/qapi-schema/flat-union-array-branch.json12
-rw-r--r--tests/qapi-schema/flat-union-array-branch.out0
-rw-r--r--tests/qapi-schema/include-cycle.err4
-rw-r--r--tests/qapi-schema/include-nested-err.err2
6 files changed, 17 insertions, 3 deletions
diff --git a/tests/qapi-schema/flat-union-array-branch.err b/tests/qapi-schema/flat-union-array-branch.err
new file mode 100644
index 0000000000..8ea91eadb2
--- /dev/null
+++ b/tests/qapi-schema/flat-union-array-branch.err
@@ -0,0 +1 @@
+tests/qapi-schema/flat-union-array-branch.json:8: Member 'value1' of union 'TestUnion' cannot be an array
diff --git a/tests/qapi-schema/flat-union-array-branch.exit b/tests/qapi-schema/flat-union-array-branch.exit
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/tests/qapi-schema/flat-union-array-branch.exit
@@ -0,0 +1 @@
+1
diff --git a/tests/qapi-schema/flat-union-array-branch.json b/tests/qapi-schema/flat-union-array-branch.json
new file mode 100644
index 0000000000..0b98820a8f
--- /dev/null
+++ b/tests/qapi-schema/flat-union-array-branch.json
@@ -0,0 +1,12 @@
+# we require flat union branches to be a struct
+{ 'enum': 'TestEnum',
+ 'data': [ 'value1', 'value2' ] }
+{ 'struct': 'Base',
+ 'data': { 'enum1': 'TestEnum' } }
+{ 'struct': 'TestTypeB',
+ 'data': { 'integer': 'int' } }
+{ 'union': 'TestUnion',
+ 'base': 'Base',
+ 'discriminator': 'enum1',
+ 'data': { 'value1': ['TestTypeB'],
+ 'value2': 'TestTypeB' } }
diff --git a/tests/qapi-schema/flat-union-array-branch.out b/tests/qapi-schema/flat-union-array-branch.out
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/qapi-schema/flat-union-array-branch.out
diff --git a/tests/qapi-schema/include-cycle.err b/tests/qapi-schema/include-cycle.err
index 602cf62329..bdcd07dce2 100644
--- a/tests/qapi-schema/include-cycle.err
+++ b/tests/qapi-schema/include-cycle.err
@@ -1,3 +1,3 @@
In file included from tests/qapi-schema/include-cycle.json:1:
-In file included from include-cycle-b.json:1:
-include-cycle-c.json:1: Inclusion loop for include-cycle.json
+In file included from tests/qapi-schema/include-cycle-b.json:1:
+tests/qapi-schema/include-cycle-c.json:1: Inclusion loop for include-cycle.json
diff --git a/tests/qapi-schema/include-nested-err.err b/tests/qapi-schema/include-nested-err.err
index 1dacbda3be..1b7b22706b 100644
--- a/tests/qapi-schema/include-nested-err.err
+++ b/tests/qapi-schema/include-nested-err.err
@@ -1,2 +1,2 @@
In file included from tests/qapi-schema/include-nested-err.json:1:
-missing-colon.json:1:10: Expected ":"
+tests/qapi-schema/missing-colon.json:1:10: Expected ":"