]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/qapi-schema: Rename tests from data- to args-
authorMarkus Armbruster <armbru@redhat.com>
Fri, 31 Jul 2015 11:30:50 +0000 (13:30 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 4 Sep 2015 13:47:15 +0000 (15:47 +0200)
Since every schema entity has 'data', the data- prefix conveys no
information.  These tests actually exercise commands.  Only commands
have arguments, so change the prefix to to args-.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
57 files changed:
tests/Makefile
tests/qapi-schema/args-array-empty.err [new file with mode: 0644]
tests/qapi-schema/args-array-empty.exit [new file with mode: 0644]
tests/qapi-schema/args-array-empty.json [new file with mode: 0644]
tests/qapi-schema/args-array-empty.out [new file with mode: 0644]
tests/qapi-schema/args-array-unknown.err [new file with mode: 0644]
tests/qapi-schema/args-array-unknown.exit [new file with mode: 0644]
tests/qapi-schema/args-array-unknown.json [new file with mode: 0644]
tests/qapi-schema/args-array-unknown.out [new file with mode: 0644]
tests/qapi-schema/args-int.err [new file with mode: 0644]
tests/qapi-schema/args-int.exit [new file with mode: 0644]
tests/qapi-schema/args-int.json [new file with mode: 0644]
tests/qapi-schema/args-int.out [new file with mode: 0644]
tests/qapi-schema/args-member-array-bad.err [new file with mode: 0644]
tests/qapi-schema/args-member-array-bad.exit [new file with mode: 0644]
tests/qapi-schema/args-member-array-bad.json [new file with mode: 0644]
tests/qapi-schema/args-member-array-bad.out [new file with mode: 0644]
tests/qapi-schema/args-member-array.err [new file with mode: 0644]
tests/qapi-schema/args-member-array.exit [new file with mode: 0644]
tests/qapi-schema/args-member-array.json [new file with mode: 0644]
tests/qapi-schema/args-member-array.out [new file with mode: 0644]
tests/qapi-schema/args-member-unknown.err [new file with mode: 0644]
tests/qapi-schema/args-member-unknown.exit [new file with mode: 0644]
tests/qapi-schema/args-member-unknown.json [new file with mode: 0644]
tests/qapi-schema/args-member-unknown.out [new file with mode: 0644]
tests/qapi-schema/args-unknown.err [new file with mode: 0644]
tests/qapi-schema/args-unknown.exit [new file with mode: 0644]
tests/qapi-schema/args-unknown.json [new file with mode: 0644]
tests/qapi-schema/args-unknown.out [new file with mode: 0644]
tests/qapi-schema/data-array-empty.err [deleted file]
tests/qapi-schema/data-array-empty.exit [deleted file]
tests/qapi-schema/data-array-empty.json [deleted file]
tests/qapi-schema/data-array-empty.out [deleted file]
tests/qapi-schema/data-array-unknown.err [deleted file]
tests/qapi-schema/data-array-unknown.exit [deleted file]
tests/qapi-schema/data-array-unknown.json [deleted file]
tests/qapi-schema/data-array-unknown.out [deleted file]
tests/qapi-schema/data-int.err [deleted file]
tests/qapi-schema/data-int.exit [deleted file]
tests/qapi-schema/data-int.json [deleted file]
tests/qapi-schema/data-int.out [deleted file]
tests/qapi-schema/data-member-array-bad.err [deleted file]
tests/qapi-schema/data-member-array-bad.exit [deleted file]
tests/qapi-schema/data-member-array-bad.json [deleted file]
tests/qapi-schema/data-member-array-bad.out [deleted file]
tests/qapi-schema/data-member-array.err [deleted file]
tests/qapi-schema/data-member-array.exit [deleted file]
tests/qapi-schema/data-member-array.json [deleted file]
tests/qapi-schema/data-member-array.out [deleted file]
tests/qapi-schema/data-member-unknown.err [deleted file]
tests/qapi-schema/data-member-unknown.exit [deleted file]
tests/qapi-schema/data-member-unknown.json [deleted file]
tests/qapi-schema/data-member-unknown.out [deleted file]
tests/qapi-schema/data-unknown.err [deleted file]
tests/qapi-schema/data-unknown.exit [deleted file]
tests/qapi-schema/data-unknown.json [deleted file]
tests/qapi-schema/data-unknown.out [deleted file]

index 52711237ca669bae97f1fa23d7ab5f0f65970e05..0d560c51aa66dea589fcf9a0dae64f92739b1e65 100644 (file)
@@ -229,9 +229,9 @@ check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
        redefined-type.json redefined-command.json redefined-builtin.json \
        redefined-event.json command-int.json bad-data.json event-max.json \
        type-bypass.json type-bypass-no-gen.json type-bypass-bad-gen.json \
-       data-array-empty.json data-array-unknown.json data-int.json \
-       data-unknown.json data-member-unknown.json data-member-array.json \
-       data-member-array-bad.json returns-array-bad.json returns-int.json \
+       args-array-empty.json args-array-unknown.json args-int.json \
+       args-unknown.json args-member-unknown.json args-member-array.json \
+       args-member-array-bad.json returns-array-bad.json returns-int.json \
        returns-unknown.json returns-alternate.json returns-whitelist.json \
        missing-colon.json missing-comma-list.json missing-comma-object.json \
        nested-struct-data.json nested-struct-returns.json non-objects.json \
diff --git a/tests/qapi-schema/args-array-empty.err b/tests/qapi-schema/args-array-empty.err
new file mode 100644 (file)
index 0000000..cb7ed33
--- /dev/null
@@ -0,0 +1 @@
+tests/qapi-schema/args-array-empty.json:2: Member 'empty' of 'data' for command 'oops': array type must contain single type name
diff --git a/tests/qapi-schema/args-array-empty.exit b/tests/qapi-schema/args-array-empty.exit
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/qapi-schema/args-array-empty.json b/tests/qapi-schema/args-array-empty.json
new file mode 100644 (file)
index 0000000..652dcfb
--- /dev/null
@@ -0,0 +1,2 @@
+# we reject an array for data if it does not contain a known type
+{ 'command': 'oops', 'data': { 'empty': [ ] } }
diff --git a/tests/qapi-schema/args-array-empty.out b/tests/qapi-schema/args-array-empty.out
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/qapi-schema/args-array-unknown.err b/tests/qapi-schema/args-array-unknown.err
new file mode 100644 (file)
index 0000000..7834d11
--- /dev/null
@@ -0,0 +1 @@
+tests/qapi-schema/args-array-unknown.json:2: Member 'array' of 'data' for command 'oops' uses unknown type 'array of NoSuchType'
diff --git a/tests/qapi-schema/args-array-unknown.exit b/tests/qapi-schema/args-array-unknown.exit
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/qapi-schema/args-array-unknown.json b/tests/qapi-schema/args-array-unknown.json
new file mode 100644 (file)
index 0000000..6f3e883
--- /dev/null
@@ -0,0 +1,2 @@
+# we reject an array for data if it does not contain a known type
+{ 'command': 'oops', 'data': { 'array': [ 'NoSuchType' ] } }
diff --git a/tests/qapi-schema/args-array-unknown.out b/tests/qapi-schema/args-array-unknown.out
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/qapi-schema/args-int.err b/tests/qapi-schema/args-int.err
new file mode 100644 (file)
index 0000000..dc1d250
--- /dev/null
@@ -0,0 +1 @@
+tests/qapi-schema/args-int.json:2: 'data' for command 'oops' cannot use built-in type 'int'
diff --git a/tests/qapi-schema/args-int.exit b/tests/qapi-schema/args-int.exit
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/qapi-schema/args-int.json b/tests/qapi-schema/args-int.json
new file mode 100644 (file)
index 0000000..a334d92
--- /dev/null
@@ -0,0 +1,2 @@
+# we reject commands where data is not an array or complex type
+{ 'command': 'oops', 'data': 'int' }
diff --git a/tests/qapi-schema/args-int.out b/tests/qapi-schema/args-int.out
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/qapi-schema/args-member-array-bad.err b/tests/qapi-schema/args-member-array-bad.err
new file mode 100644 (file)
index 0000000..881b4d9
--- /dev/null
@@ -0,0 +1 @@
+tests/qapi-schema/args-member-array-bad.json:2: Member 'member' of 'data' for command 'oops': array type must contain single type name
diff --git a/tests/qapi-schema/args-member-array-bad.exit b/tests/qapi-schema/args-member-array-bad.exit
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/qapi-schema/args-member-array-bad.json b/tests/qapi-schema/args-member-array-bad.json
new file mode 100644 (file)
index 0000000..b2ff144
--- /dev/null
@@ -0,0 +1,2 @@
+# we reject data if it does not contain a valid array type
+{ 'command': 'oops', 'data': { 'member': [ { 'nested': 'str' } ] } }
diff --git a/tests/qapi-schema/args-member-array-bad.out b/tests/qapi-schema/args-member-array-bad.out
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/qapi-schema/args-member-array.err b/tests/qapi-schema/args-member-array.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/qapi-schema/args-member-array.exit b/tests/qapi-schema/args-member-array.exit
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
diff --git a/tests/qapi-schema/args-member-array.json b/tests/qapi-schema/args-member-array.json
new file mode 100644 (file)
index 0000000..e6f7f5d
--- /dev/null
@@ -0,0 +1,4 @@
+# valid array members
+{ 'enum': 'abc', 'data': [ 'a', 'b', 'c' ] }
+{ 'struct': 'def', 'data': { 'array': [ 'abc' ] } }
+{ 'command': 'okay', 'data': { 'member1': [ 'int' ], 'member2': [ 'def' ] } }
diff --git a/tests/qapi-schema/args-member-array.out b/tests/qapi-schema/args-member-array.out
new file mode 100644 (file)
index 0000000..c39fa25
--- /dev/null
@@ -0,0 +1,5 @@
+[OrderedDict([('enum', 'abc'), ('data', ['a', 'b', 'c'])]),
+ OrderedDict([('struct', 'def'), ('data', OrderedDict([('array', ['abc'])]))]),
+ OrderedDict([('command', 'okay'), ('data', OrderedDict([('member1', ['int']), ('member2', ['def'])]))])]
+[{'enum_name': 'abc', 'enum_values': ['a', 'b', 'c']}]
+[OrderedDict([('struct', 'def'), ('data', OrderedDict([('array', ['abc'])]))])]
diff --git a/tests/qapi-schema/args-member-unknown.err b/tests/qapi-schema/args-member-unknown.err
new file mode 100644 (file)
index 0000000..f6f8282
--- /dev/null
@@ -0,0 +1 @@
+tests/qapi-schema/args-member-unknown.json:2: Member 'member' of 'data' for command 'oops' uses unknown type 'NoSuchType'
diff --git a/tests/qapi-schema/args-member-unknown.exit b/tests/qapi-schema/args-member-unknown.exit
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/qapi-schema/args-member-unknown.json b/tests/qapi-schema/args-member-unknown.json
new file mode 100644 (file)
index 0000000..342a41e
--- /dev/null
@@ -0,0 +1,2 @@
+# we reject data if it does not contain a known type
+{ 'command': 'oops', 'data': { 'member': 'NoSuchType' } }
diff --git a/tests/qapi-schema/args-member-unknown.out b/tests/qapi-schema/args-member-unknown.out
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/qapi-schema/args-unknown.err b/tests/qapi-schema/args-unknown.err
new file mode 100644 (file)
index 0000000..4d91ec8
--- /dev/null
@@ -0,0 +1 @@
+tests/qapi-schema/args-unknown.json:2: 'data' for command 'oops' uses unknown type 'NoSuchType'
diff --git a/tests/qapi-schema/args-unknown.exit b/tests/qapi-schema/args-unknown.exit
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/qapi-schema/args-unknown.json b/tests/qapi-schema/args-unknown.json
new file mode 100644 (file)
index 0000000..32aba43
--- /dev/null
@@ -0,0 +1,2 @@
+# we reject data if it does not contain a known type
+{ 'command': 'oops', 'data': 'NoSuchType' }
diff --git a/tests/qapi-schema/args-unknown.out b/tests/qapi-schema/args-unknown.out
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/qapi-schema/data-array-empty.err b/tests/qapi-schema/data-array-empty.err
deleted file mode 100644 (file)
index f713f14..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tests/qapi-schema/data-array-empty.json:2: Member 'empty' of 'data' for command 'oops': array type must contain single type name
diff --git a/tests/qapi-schema/data-array-empty.exit b/tests/qapi-schema/data-array-empty.exit
deleted file mode 100644 (file)
index d00491f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/qapi-schema/data-array-empty.json b/tests/qapi-schema/data-array-empty.json
deleted file mode 100644 (file)
index 652dcfb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# we reject an array for data if it does not contain a known type
-{ 'command': 'oops', 'data': { 'empty': [ ] } }
diff --git a/tests/qapi-schema/data-array-empty.out b/tests/qapi-schema/data-array-empty.out
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/qapi-schema/data-array-unknown.err b/tests/qapi-schema/data-array-unknown.err
deleted file mode 100644 (file)
index 8b731bb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tests/qapi-schema/data-array-unknown.json:2: Member 'array' of 'data' for command 'oops' uses unknown type 'array of NoSuchType'
diff --git a/tests/qapi-schema/data-array-unknown.exit b/tests/qapi-schema/data-array-unknown.exit
deleted file mode 100644 (file)
index d00491f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/qapi-schema/data-array-unknown.json b/tests/qapi-schema/data-array-unknown.json
deleted file mode 100644 (file)
index 6f3e883..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# we reject an array for data if it does not contain a known type
-{ 'command': 'oops', 'data': { 'array': [ 'NoSuchType' ] } }
diff --git a/tests/qapi-schema/data-array-unknown.out b/tests/qapi-schema/data-array-unknown.out
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/qapi-schema/data-int.err b/tests/qapi-schema/data-int.err
deleted file mode 100644 (file)
index 1a9b077..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tests/qapi-schema/data-int.json:2: 'data' for command 'oops' cannot use built-in type 'int'
diff --git a/tests/qapi-schema/data-int.exit b/tests/qapi-schema/data-int.exit
deleted file mode 100644 (file)
index d00491f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/qapi-schema/data-int.json b/tests/qapi-schema/data-int.json
deleted file mode 100644 (file)
index a334d92..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# we reject commands where data is not an array or complex type
-{ 'command': 'oops', 'data': 'int' }
diff --git a/tests/qapi-schema/data-int.out b/tests/qapi-schema/data-int.out
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/qapi-schema/data-member-array-bad.err b/tests/qapi-schema/data-member-array-bad.err
deleted file mode 100644 (file)
index 2c072d5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tests/qapi-schema/data-member-array-bad.json:2: Member 'member' of 'data' for command 'oops': array type must contain single type name
diff --git a/tests/qapi-schema/data-member-array-bad.exit b/tests/qapi-schema/data-member-array-bad.exit
deleted file mode 100644 (file)
index d00491f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/qapi-schema/data-member-array-bad.json b/tests/qapi-schema/data-member-array-bad.json
deleted file mode 100644 (file)
index b2ff144..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# we reject data if it does not contain a valid array type
-{ 'command': 'oops', 'data': { 'member': [ { 'nested': 'str' } ] } }
diff --git a/tests/qapi-schema/data-member-array-bad.out b/tests/qapi-schema/data-member-array-bad.out
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/qapi-schema/data-member-array.err b/tests/qapi-schema/data-member-array.err
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/qapi-schema/data-member-array.exit b/tests/qapi-schema/data-member-array.exit
deleted file mode 100644 (file)
index 573541a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/tests/qapi-schema/data-member-array.json b/tests/qapi-schema/data-member-array.json
deleted file mode 100644 (file)
index e6f7f5d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# valid array members
-{ 'enum': 'abc', 'data': [ 'a', 'b', 'c' ] }
-{ 'struct': 'def', 'data': { 'array': [ 'abc' ] } }
-{ 'command': 'okay', 'data': { 'member1': [ 'int' ], 'member2': [ 'def' ] } }
diff --git a/tests/qapi-schema/data-member-array.out b/tests/qapi-schema/data-member-array.out
deleted file mode 100644 (file)
index c39fa25..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-[OrderedDict([('enum', 'abc'), ('data', ['a', 'b', 'c'])]),
- OrderedDict([('struct', 'def'), ('data', OrderedDict([('array', ['abc'])]))]),
- OrderedDict([('command', 'okay'), ('data', OrderedDict([('member1', ['int']), ('member2', ['def'])]))])]
-[{'enum_name': 'abc', 'enum_values': ['a', 'b', 'c']}]
-[OrderedDict([('struct', 'def'), ('data', OrderedDict([('array', ['abc'])]))])]
diff --git a/tests/qapi-schema/data-member-unknown.err b/tests/qapi-schema/data-member-unknown.err
deleted file mode 100644 (file)
index ab905db..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tests/qapi-schema/data-member-unknown.json:2: Member 'member' of 'data' for command 'oops' uses unknown type 'NoSuchType'
diff --git a/tests/qapi-schema/data-member-unknown.exit b/tests/qapi-schema/data-member-unknown.exit
deleted file mode 100644 (file)
index d00491f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/qapi-schema/data-member-unknown.json b/tests/qapi-schema/data-member-unknown.json
deleted file mode 100644 (file)
index 342a41e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# we reject data if it does not contain a known type
-{ 'command': 'oops', 'data': { 'member': 'NoSuchType' } }
diff --git a/tests/qapi-schema/data-member-unknown.out b/tests/qapi-schema/data-member-unknown.out
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/qapi-schema/data-unknown.err b/tests/qapi-schema/data-unknown.err
deleted file mode 100644 (file)
index 5b07277..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tests/qapi-schema/data-unknown.json:2: 'data' for command 'oops' uses unknown type 'NoSuchType'
diff --git a/tests/qapi-schema/data-unknown.exit b/tests/qapi-schema/data-unknown.exit
deleted file mode 100644 (file)
index d00491f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/qapi-schema/data-unknown.json b/tests/qapi-schema/data-unknown.json
deleted file mode 100644 (file)
index 32aba43..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# we reject data if it does not contain a known type
-{ 'command': 'oops', 'data': 'NoSuchType' }
diff --git a/tests/qapi-schema/data-unknown.out b/tests/qapi-schema/data-unknown.out
deleted file mode 100644 (file)
index e69de29..0000000