qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

qapi: Back out doc comments added just to please qapi.py

This reverts commit 3313b61's changes to tests/qapi-schema/, except
for tests/qapi-schema/doc-*.

We could keep some of these doc comments to serve as positive test
cases. However, they don't actually add to what we get from doc
comment use in actual schemas, as we we don't test output matches
expectations, and don't systematically cover doc comment features.
Proper positive test coverage would be nice.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1489582656-31133-4-git-send-email-armbru@redhat.com>

+92 -1074
+1 -1
tests/qapi-schema/alternate-any.err
··· 1 - tests/qapi-schema/alternate-any.json:6: Alternate 'Alt' member 'one' cannot use type 'any' 1 + tests/qapi-schema/alternate-any.json:2: Alternate 'Alt' member 'one' cannot use type 'any'
-4
tests/qapi-schema/alternate-any.json
··· 1 1 # we do not allow the 'any' type as an alternate branch 2 - 3 - ## 4 - # @Alt: 5 - ## 6 2 { 'alternate': 'Alt', 7 3 'data': { 'one': 'any', 8 4 'two': 'int' } }
+1 -1
tests/qapi-schema/alternate-array.err
··· 1 - tests/qapi-schema/alternate-array.json:12: Member 'two' of alternate 'Alt' cannot be an array 1 + tests/qapi-schema/alternate-array.json:5: Member 'two' of alternate 'Alt' cannot be an array
-7
tests/qapi-schema/alternate-array.json
··· 1 1 # we do not allow array branches in alternates 2 - 3 - ## 4 - # @One: 5 - ## 6 2 # TODO: should we support this? 7 3 { 'struct': 'One', 8 4 'data': { 'name': 'str' } } 9 - ## 10 - # @Alt: 11 - ## 12 5 { 'alternate': 'Alt', 13 6 'data': { 'one': 'One', 14 7 'two': [ 'int' ] } }
+1 -1
tests/qapi-schema/alternate-base.err
··· 1 - tests/qapi-schema/alternate-base.json:11: Unknown key 'base' in alternate 'Alt' 1 + tests/qapi-schema/alternate-base.json:4: Unknown key 'base' in alternate 'Alt'
-7
tests/qapi-schema/alternate-base.json
··· 1 1 # we reject alternate with base type 2 - 3 - ## 4 - # @Base: 5 - ## 6 2 { 'struct': 'Base', 7 3 'data': { 'string': 'str' } } 8 - ## 9 - # @Alt: 10 - ## 11 4 { 'alternate': 'Alt', 12 5 'base': 'Base', 13 6 'data': { 'number': 'int' } }
+1 -1
tests/qapi-schema/alternate-clash.err
··· 1 - tests/qapi-schema/alternate-clash.json:11: 'a_b' (branch of Alt1) collides with 'a-b' (branch of Alt1) 1 + tests/qapi-schema/alternate-clash.json:7: 'a_b' (branch of Alt1) collides with 'a-b' (branch of Alt1)
-4
tests/qapi-schema/alternate-clash.json
··· 4 4 # TODO: In the future, if alternates are simplified to not generate 5 5 # the implicit Alt1Kind enum, we would still have a collision with the 6 6 # resulting C union trying to have two members named 'a_b'. 7 - 8 - ## 9 - # @Alt1: 10 - ## 11 7 { 'alternate': 'Alt1', 12 8 'data': { 'a-b': 'str', 'a_b': 'int' } }
+1 -1
tests/qapi-schema/alternate-conflict-dict.err
··· 1 - tests/qapi-schema/alternate-conflict-dict.json:16: Alternate 'Alt' member 'two' can't be distinguished from member 'one' 1 + tests/qapi-schema/alternate-conflict-dict.json:6: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
-10
tests/qapi-schema/alternate-conflict-dict.json
··· 1 1 # we reject alternates with multiple object branches 2 - 3 - ## 4 - # @One: 5 - ## 6 2 { 'struct': 'One', 7 3 'data': { 'name': 'str' } } 8 - ## 9 - # @Two: 10 - ## 11 4 { 'struct': 'Two', 12 5 'data': { 'value': 'int' } } 13 - ## 14 - # @Alt: 15 - ## 16 6 { 'alternate': 'Alt', 17 7 'data': { 'one': 'One', 18 8 'two': 'Two' } }
+1 -1
tests/qapi-schema/alternate-conflict-string.err
··· 1 - tests/qapi-schema/alternate-conflict-string.json:11: Alternate 'Alt' member 'two' can't be distinguished from member 'one' 1 + tests/qapi-schema/alternate-conflict-string.json:4: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
-7
tests/qapi-schema/alternate-conflict-string.json
··· 1 1 # we reject alternates with multiple string-like branches 2 - 3 - ## 4 - # @Enum: 5 - ## 6 2 { 'enum': 'Enum', 7 3 'data': [ 'hello', 'world' ] } 8 - ## 9 - # @Alt: 10 - ## 11 4 { 'alternate': 'Alt', 12 5 'data': { 'one': 'str', 13 6 'two': 'Enum' } }
+1 -1
tests/qapi-schema/alternate-empty.err
··· 1 - tests/qapi-schema/alternate-empty.json:6: Alternate 'Alt' should have at least two branches in 'data' 1 + tests/qapi-schema/alternate-empty.json:2: Alternate 'Alt' should have at least two branches in 'data'
-4
tests/qapi-schema/alternate-empty.json
··· 1 1 # alternates must list at least two types to be useful 2 - 3 - ## 4 - # @Alt: 5 - ## 6 2 { 'alternate': 'Alt', 'data': { 'i': 'int' } }
+1 -1
tests/qapi-schema/alternate-nested.err
··· 1 - tests/qapi-schema/alternate-nested.json:11: Member 'nested' of alternate 'Alt2' cannot use alternate type 'Alt1' 1 + tests/qapi-schema/alternate-nested.json:4: Member 'nested' of alternate 'Alt2' cannot use alternate type 'Alt1'
-7
tests/qapi-schema/alternate-nested.json
··· 1 1 # we reject a nested alternate branch 2 - 3 - ## 4 - # @Alt1: 5 - ## 6 2 { 'alternate': 'Alt1', 7 3 'data': { 'name': 'str', 'value': 'int' } } 8 - ## 9 - # @Alt2: 10 - ## 11 4 { 'alternate': 'Alt2', 12 5 'data': { 'nested': 'Alt1', 'b': 'bool' } }
+1 -1
tests/qapi-schema/alternate-unknown.err
··· 1 - tests/qapi-schema/alternate-unknown.json:6: Member 'unknown' of alternate 'Alt' uses unknown type 'MissingType' 1 + tests/qapi-schema/alternate-unknown.json:2: Member 'unknown' of alternate 'Alt' uses unknown type 'MissingType'
-4
tests/qapi-schema/alternate-unknown.json
··· 1 1 # we reject an alternate with unknown type in branch 2 - 3 - ## 4 - # @Alt: 5 - ## 6 2 { 'alternate': 'Alt', 7 3 'data': { 'unknown': 'MissingType', 'i': 'int' } }
+1 -1
tests/qapi-schema/args-alternate.err
··· 1 - tests/qapi-schema/args-alternate.json:11: 'data' for command 'oops' cannot use alternate type 'Alt' 1 + tests/qapi-schema/args-alternate.json:3: 'data' for command 'oops' cannot use alternate type 'Alt'
-8
tests/qapi-schema/args-alternate.json
··· 1 1 # we do not allow alternate arguments 2 - 3 - ## 4 - # @Alt: 5 - ## 6 2 { 'alternate': 'Alt', 'data': { 'case1': 'int', 'case2': 'str' } } 7 - 8 - ## 9 - # @oops: 10 - ## 11 3 { 'command': 'oops', 'data': 'Alt' }
+1 -1
tests/qapi-schema/args-any.err
··· 1 - tests/qapi-schema/args-any.json:6: 'data' for command 'oops' cannot use built-in type 'any' 1 + tests/qapi-schema/args-any.json:2: 'data' for command 'oops' cannot use built-in type 'any'
-4
tests/qapi-schema/args-any.json
··· 1 1 # we do not allow an 'any' argument 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'data': 'any' }
+1 -1
tests/qapi-schema/args-array-empty.err
··· 1 - tests/qapi-schema/args-array-empty.json:6: Member 'empty' of 'data' for command 'oops': array type must contain single type name 1 + tests/qapi-schema/args-array-empty.json:2: Member 'empty' of 'data' for command 'oops': array type must contain single type name
-4
tests/qapi-schema/args-array-empty.json
··· 1 1 # we reject an array for data if it does not contain a known type 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'data': { 'empty': [ ] } }
+1 -1
tests/qapi-schema/args-array-unknown.err
··· 1 - tests/qapi-schema/args-array-unknown.json:6: Member 'array' of 'data' for command 'oops' uses unknown type 'NoSuchType' 1 + tests/qapi-schema/args-array-unknown.json:2: Member 'array' of 'data' for command 'oops' uses unknown type 'NoSuchType'
-4
tests/qapi-schema/args-array-unknown.json
··· 1 1 # we reject an array for data if it does not contain a known type 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'data': { 'array': [ 'NoSuchType' ] } }
+1 -1
tests/qapi-schema/args-bad-boxed.err
··· 1 - tests/qapi-schema/args-bad-boxed.json:6: 'boxed' of command 'foo' should only use true value 1 + tests/qapi-schema/args-bad-boxed.json:2: 'boxed' of command 'foo' should only use true value
-4
tests/qapi-schema/args-bad-boxed.json
··· 1 1 # 'boxed' should only appear with value true 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'command': 'foo', 'boxed': false }
+1 -1
tests/qapi-schema/args-boxed-anon.err
··· 1 - tests/qapi-schema/args-boxed-anon.json:6: 'data' for command 'foo' should be a type name 1 + tests/qapi-schema/args-boxed-anon.json:2: 'data' for command 'foo' should be a type name
-4
tests/qapi-schema/args-boxed-anon.json
··· 1 1 # 'boxed' can only be used with named types 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'command': 'foo', 'boxed': true, 'data': { 'string': 'str' } }
+1 -1
tests/qapi-schema/args-boxed-empty.err
··· 1 - tests/qapi-schema/args-boxed-empty.json:11: Cannot use 'boxed' with empty type 1 + tests/qapi-schema/args-boxed-empty.json:3: Cannot use 'boxed' with empty type
-8
tests/qapi-schema/args-boxed-empty.json
··· 1 1 # 'boxed' requires a non-empty type 2 - 3 - ## 4 - # @Empty: 5 - ## 6 2 { 'struct': 'Empty', 'data': {} } 7 - 8 - ## 9 - # @foo: 10 - ## 11 3 { 'command': 'foo', 'boxed': true, 'data': 'Empty' }
+1 -1
tests/qapi-schema/args-boxed-string.err
··· 1 - tests/qapi-schema/args-boxed-string.json:6: 'data' for command 'foo' cannot use built-in type 'str' 1 + tests/qapi-schema/args-boxed-string.json:2: 'data' for command 'foo' cannot use built-in type 'str'
-4
tests/qapi-schema/args-boxed-string.json
··· 1 1 # 'boxed' requires a complex (not built-in) type 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'command': 'foo', 'boxed': true, 'data': 'str' }
+1 -1
tests/qapi-schema/args-int.err
··· 1 - tests/qapi-schema/args-int.json:6: 'data' for command 'oops' cannot use built-in type 'int' 1 + tests/qapi-schema/args-int.json:2: 'data' for command 'oops' cannot use built-in type 'int'
-4
tests/qapi-schema/args-int.json
··· 1 1 # we reject commands where data is not an array or complex type 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'data': 'int' }
+1 -1
tests/qapi-schema/args-invalid.err
··· 1 - tests/qapi-schema/args-invalid.json:4: 'data' for command 'foo' should be a dictionary or type name 1 + tests/qapi-schema/args-invalid.json:1: 'data' for command 'foo' should be a dictionary or type name
-3
tests/qapi-schema/args-invalid.json
··· 1 - ## 2 - # @foo: 3 - ## 4 1 { 'command': 'foo', 5 2 'data': false }
+1 -1
tests/qapi-schema/args-member-array-bad.err
··· 1 - tests/qapi-schema/args-member-array-bad.json:6: Member 'member' of 'data' for command 'oops': array type must contain single type name 1 + tests/qapi-schema/args-member-array-bad.json:2: Member 'member' of 'data' for command 'oops': array type must contain single type name
-4
tests/qapi-schema/args-member-array-bad.json
··· 1 1 # we reject data if it does not contain a valid array type 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'data': { 'member': [ { 'nested': 'str' } ] } }
+1 -1
tests/qapi-schema/args-member-case.err
··· 1 - tests/qapi-schema/args-member-case.json:6: 'Arg' (parameter of no-way-this-will-get-whitelisted) should not use uppercase 1 + tests/qapi-schema/args-member-case.json:2: 'Arg' (parameter of no-way-this-will-get-whitelisted) should not use uppercase
-4
tests/qapi-schema/args-member-case.json
··· 1 1 # Member names should be 'lower-case' unless the struct/command is whitelisted 2 - 3 - ## 4 - # @no-way-this-will-get-whitelisted: 5 - ## 6 2 { 'command': 'no-way-this-will-get-whitelisted', 'data': { 'Arg': 'int' } }
+1 -1
tests/qapi-schema/args-member-unknown.err
··· 1 - tests/qapi-schema/args-member-unknown.json:6: Member 'member' of 'data' for command 'oops' uses unknown type 'NoSuchType' 1 + tests/qapi-schema/args-member-unknown.json:2: Member 'member' of 'data' for command 'oops' uses unknown type 'NoSuchType'
-4
tests/qapi-schema/args-member-unknown.json
··· 1 1 # we reject data if it does not contain a known type 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'data': { 'member': 'NoSuchType' } }
+1 -1
tests/qapi-schema/args-name-clash.err
··· 1 - tests/qapi-schema/args-name-clash.json:8: 'a_b' (parameter of oops) collides with 'a-b' (parameter of oops) 1 + tests/qapi-schema/args-name-clash.json:4: 'a_b' (parameter of oops) collides with 'a-b' (parameter of oops)
-4
tests/qapi-schema/args-name-clash.json
··· 1 1 # C member name collision 2 2 # Reject members that clash when mapped to C names (we would have two 'a_b' 3 3 # members). 4 - 5 - ## 6 - # @oops: 7 - ## 8 4 { 'command': 'oops', 'data': { 'a-b': 'str', 'a_b': 'str' } }
+1 -1
tests/qapi-schema/args-union.err
··· 1 - tests/qapi-schema/args-union.json:10: 'data' for command 'oops' cannot use union type 'Uni' 1 + tests/qapi-schema/args-union.json:3: 'data' for command 'oops' cannot use union type 'Uni'
-7
tests/qapi-schema/args-union.json
··· 1 1 # use of union arguments requires 'boxed':true 2 - 3 - ## 4 - # @Uni: 5 - ## 6 2 { 'union': 'Uni', 'data': { 'case1': 'int', 'case2': 'str' } } 7 - ## 8 - # oops: 9 - ## 10 3 { 'command': 'oops', 'data': 'Uni' }
+1 -1
tests/qapi-schema/args-unknown.err
··· 1 - tests/qapi-schema/args-unknown.json:6: 'data' for command 'oops' uses unknown type 'NoSuchType' 1 + tests/qapi-schema/args-unknown.json:2: 'data' for command 'oops' uses unknown type 'NoSuchType'
-4
tests/qapi-schema/args-unknown.json
··· 1 1 # we reject data if it does not contain a known type 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'data': 'NoSuchType' }
+1 -1
tests/qapi-schema/bad-base.err
··· 1 - tests/qapi-schema/bad-base.json:10: 'base' for struct 'MyType' cannot use union type 'Union' 1 + tests/qapi-schema/bad-base.json:3: 'base' for struct 'MyType' cannot use union type 'Union'
-7
tests/qapi-schema/bad-base.json
··· 1 1 # we reject a base that is not a struct 2 - 3 - ## 4 - # @Union: 5 - ## 6 2 { 'union': 'Union', 'data': { 'a': 'int', 'b': 'str' } } 7 - ## 8 - # @MyType: 9 - ## 10 3 { 'struct': 'MyType', 'base': 'Union', 'data': { 'c': 'int' } }
+1 -1
tests/qapi-schema/bad-data.err
··· 1 - tests/qapi-schema/bad-data.json:6: 'data' for command 'oops' cannot be an array 1 + tests/qapi-schema/bad-data.json:2: 'data' for command 'oops' cannot be an array
-4
tests/qapi-schema/bad-data.json
··· 1 1 # we ensure 'data' is a dictionary for all but enums 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'data': [ ] }
+1 -1
tests/qapi-schema/bad-ident.err
··· 1 - tests/qapi-schema/bad-ident.json:6: 'struct' does not allow optional name '*oops' 1 + tests/qapi-schema/bad-ident.json:2: 'struct' does not allow optional name '*oops'
-4
tests/qapi-schema/bad-ident.json
··· 1 1 # we reject creating a type name with bad name 2 - 3 - ## 4 - # @*oops: 5 - ## 6 2 { 'struct': '*oops', 'data': { 'i': 'int' } }
+1 -1
tests/qapi-schema/bad-type-bool.err
··· 1 - tests/qapi-schema/bad-type-bool.json:6: 'struct' key must have a string value 1 + tests/qapi-schema/bad-type-bool.json:2: 'struct' key must have a string value
-4
tests/qapi-schema/bad-type-bool.json
··· 1 1 # we reject an expression with a metatype that is not a string 2 - 3 - ## 4 - # @true: 5 - ## 6 2 { 'struct': true, 'data': { } }
+1 -1
tests/qapi-schema/bad-type-dict.err
··· 1 - tests/qapi-schema/bad-type-dict.json:6: 'command' key must have a string value 1 + tests/qapi-schema/bad-type-dict.json:2: 'command' key must have a string value
-4
tests/qapi-schema/bad-type-dict.json
··· 1 1 # we reject an expression with a metatype that is not a string 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'command': { } }
+1 -1
tests/qapi-schema/base-cycle-direct.err
··· 1 - tests/qapi-schema/base-cycle-direct.json:6: Object Loopy contains itself 1 + tests/qapi-schema/base-cycle-direct.json:2: Object Loopy contains itself
-4
tests/qapi-schema/base-cycle-direct.json
··· 1 1 # we reject a loop in base classes 2 - 3 - ## 4 - # @Loopy: 5 - ## 6 2 { 'struct': 'Loopy', 'base': 'Loopy', 'data': {} }
+1 -1
tests/qapi-schema/base-cycle-indirect.err
··· 1 - tests/qapi-schema/base-cycle-indirect.json:6: Object Base1 contains itself 1 + tests/qapi-schema/base-cycle-indirect.json:2: Object Base1 contains itself
-7
tests/qapi-schema/base-cycle-indirect.json
··· 1 1 # we reject a loop in base classes 2 - 3 - ## 4 - # @Base1: 5 - ## 6 2 { 'struct': 'Base1', 'base': 'Base2', 'data': {} } 7 - ## 8 - # @Base2: 9 - ## 10 3 { 'struct': 'Base2', 'base': 'Base1', 'data': {} }
+1 -1
tests/qapi-schema/command-int.err
··· 1 - tests/qapi-schema/command-int.json:6: built-in 'int' is already defined 1 + tests/qapi-schema/command-int.json:2: built-in 'int' is already defined
-4
tests/qapi-schema/command-int.json
··· 1 1 # we reject collisions between commands and types 2 - 3 - ## 4 - # @int: 5 - ## 6 2 { 'command': 'int', 'data': { 'character': 'str' } }
-4
tests/qapi-schema/comments.json
··· 1 1 # Unindented comment 2 - 3 - ## 4 - # @Status: 5 - ## 6 2 { 'enum': 'Status', # Comment to the right of code 7 3 # Indented comment 8 4 'data': [ 'good', 'bad', 'ugly' ] }
-1
tests/qapi-schema/comments.out
··· 2 2 prefix QTYPE 3 3 enum Status ['good', 'bad', 'ugly'] 4 4 object q_empty 5 - doc symbol=Status expr=('enum', 'Status')
+1 -1
tests/qapi-schema/double-type.err
··· 1 - tests/qapi-schema/double-type.json:6: Unknown key 'command' in struct 'bar' 1 + tests/qapi-schema/double-type.json:2: Unknown key 'command' in struct 'bar'
-4
tests/qapi-schema/double-type.json
··· 1 1 # we reject an expression with ambiguous metatype 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'command': 'foo', 'struct': 'bar', 'data': { } }
+1 -1
tests/qapi-schema/enum-bad-name.err
··· 1 - tests/qapi-schema/enum-bad-name.json:6: Member of enum 'MyEnum' uses invalid name 'not^possible' 1 + tests/qapi-schema/enum-bad-name.json:2: Member of enum 'MyEnum' uses invalid name 'not^possible'
-4
tests/qapi-schema/enum-bad-name.json
··· 1 1 # we ensure all enum names can map to C 2 - 3 - ## 4 - # @MyEnum: 5 - ## 6 2 { 'enum': 'MyEnum', 'data': [ 'not^possible' ] }
+1 -1
tests/qapi-schema/enum-bad-prefix.err
··· 1 - tests/qapi-schema/enum-bad-prefix.json:6: Enum 'MyEnum' requires a string for 'prefix' 1 + tests/qapi-schema/enum-bad-prefix.json:2: Enum 'MyEnum' requires a string for 'prefix'
-4
tests/qapi-schema/enum-bad-prefix.json
··· 1 1 # The prefix must be a string type 2 - 3 - ## 4 - # @MyEnum: 5 - ## 6 2 { 'enum': 'MyEnum', 'data': [ 'one' ], 'prefix': [ 'fish' ] }
+1 -1
tests/qapi-schema/enum-clash-member.err
··· 1 - tests/qapi-schema/enum-clash-member.json:6: 'one_two' (member of MyEnum) collides with 'one-two' (member of MyEnum) 1 + tests/qapi-schema/enum-clash-member.json:2: 'one_two' (member of MyEnum) collides with 'one-two' (member of MyEnum)
-4
tests/qapi-schema/enum-clash-member.json
··· 1 1 # we reject enums where members will clash when mapped to C enum 2 - 3 - ## 4 - # @MyEnum: 5 - ## 6 2 { 'enum': 'MyEnum', 'data': [ 'one-two', 'one_two' ] }
+1 -1
tests/qapi-schema/enum-dict-member.err
··· 1 - tests/qapi-schema/enum-dict-member.json:6: Member of enum 'MyEnum' requires a string name 1 + tests/qapi-schema/enum-dict-member.json:2: Member of enum 'MyEnum' requires a string name
-4
tests/qapi-schema/enum-dict-member.json
··· 1 1 # we reject any enum member that is not a string 2 - 3 - ## 4 - # @MyEnum: 5 - ## 6 2 { 'enum': 'MyEnum', 'data': [ { 'value': 'str' } ] }
+1 -1
tests/qapi-schema/enum-member-case.err
··· 1 - tests/qapi-schema/enum-member-case.json:10: 'Value' (member of NoWayThisWillGetWhitelisted) should not use uppercase 1 + tests/qapi-schema/enum-member-case.json:3: 'Value' (member of NoWayThisWillGetWhitelisted) should not use uppercase
-7
tests/qapi-schema/enum-member-case.json
··· 1 1 # Member names should be 'lower-case' unless the enum is whitelisted 2 - 3 - ## 4 - # @UuidInfo: 5 - ## 6 2 { 'enum': 'UuidInfo', 'data': [ 'Value' ] } # UuidInfo is whitelisted 7 - ## 8 - # @NoWayThisWillGetWhitelisted: 9 - ## 10 3 { 'enum': 'NoWayThisWillGetWhitelisted', 'data': [ 'Value' ] }
+1 -1
tests/qapi-schema/enum-missing-data.err
··· 1 - tests/qapi-schema/enum-missing-data.json:6: Key 'data' is missing from enum 'MyEnum' 1 + tests/qapi-schema/enum-missing-data.json:2: Key 'data' is missing from enum 'MyEnum'
-4
tests/qapi-schema/enum-missing-data.json
··· 1 1 # we require that all QAPI enums have a data array 2 - 3 - ## 4 - # @MyEnum: 5 - ## 6 2 { 'enum': 'MyEnum' }
+1 -1
tests/qapi-schema/enum-wrong-data.err
··· 1 - tests/qapi-schema/enum-wrong-data.json:6: Enum 'MyEnum' requires an array for 'data' 1 + tests/qapi-schema/enum-wrong-data.json:2: Enum 'MyEnum' requires an array for 'data'
-4
tests/qapi-schema/enum-wrong-data.json
··· 1 1 # we require that all qapi enums have an array for data 2 - 3 - ## 4 - # @MyEnum: 5 - ## 6 2 { 'enum': 'MyEnum', 'data': { 'value': 'str' } }
+1 -1
tests/qapi-schema/event-boxed-empty.err
··· 1 - tests/qapi-schema/event-boxed-empty.json:6: Use of 'boxed' requires 'data' 1 + tests/qapi-schema/event-boxed-empty.json:2: Use of 'boxed' requires 'data'
-4
tests/qapi-schema/event-boxed-empty.json
··· 1 1 # 'boxed' requires a non-empty type 2 - 3 - ## 4 - # @FOO: 5 - ## 6 2 { 'event': 'FOO', 'boxed': true }
-4
tests/qapi-schema/event-case.json
··· 1 1 # TODO: might be nice to enforce naming conventions; but until then this works 2 2 # even though events should usually be ALL_CAPS 3 - 4 - ## 5 - # @oops: 6 - ## 7 3 { 'event': 'oops' }
-1
tests/qapi-schema/event-case.out
··· 3 3 event oops None 4 4 boxed=False 5 5 object q_empty 6 - doc symbol=oops expr=('event', 'oops')
+1 -1
tests/qapi-schema/event-nest-struct.err
··· 1 - tests/qapi-schema/event-nest-struct.json:5: Member 'a' of 'data' for event 'EVENT_A' should be a type name 1 + tests/qapi-schema/event-nest-struct.json:1: Member 'a' of 'data' for event 'EVENT_A' should be a type name
-4
tests/qapi-schema/event-nest-struct.json
··· 1 - ## 2 - # @EVENT_A: 3 - # event-nest-struct 4 - ## 5 1 { 'event': 'EVENT_A', 6 2 'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } }
+1 -1
tests/qapi-schema/flat-union-array-branch.err
··· 1 - tests/qapi-schema/flat-union-array-branch.json:20: Member 'value1' of union 'TestUnion' cannot be an array 1 + tests/qapi-schema/flat-union-array-branch.json:8: Member 'value1' of union 'TestUnion' cannot be an array
-12
tests/qapi-schema/flat-union-array-branch.json
··· 1 - ## 2 - # @TestEnum: 3 - ## 4 1 # we require flat union branches to be a struct 5 2 { 'enum': 'TestEnum', 6 3 'data': [ 'value1', 'value2' ] } 7 - ## 8 - # @Base: 9 - ## 10 4 { 'struct': 'Base', 11 5 'data': { 'enum1': 'TestEnum' } } 12 - ## 13 - # @TestTypeB: 14 - ## 15 6 { 'struct': 'TestTypeB', 16 7 'data': { 'integer': 'int' } } 17 - ## 18 - # @TestUnion: 19 - ## 20 8 { 'union': 'TestUnion', 21 9 'base': 'Base', 22 10 'discriminator': 'enum1',
+1 -1
tests/qapi-schema/flat-union-bad-base.err
··· 1 - tests/qapi-schema/flat-union-bad-base.json:21: 'string' (member of TestTypeA) collides with 'string' (base of TestUnion) 1 + tests/qapi-schema/flat-union-bad-base.json:8: 'string' (member of TestTypeA) collides with 'string' (base of TestUnion)
-13
tests/qapi-schema/flat-union-bad-base.json
··· 1 1 # we allow anonymous base, but enforce no duplicate keys 2 - 3 - ## 4 - # @TestEnum: 5 - ## 6 2 { 'enum': 'TestEnum', 7 3 'data': [ 'value1', 'value2' ] } 8 - ## 9 - # @TestTypeA: 10 - ## 11 4 { 'struct': 'TestTypeA', 12 5 'data': { 'string': 'str' } } 13 - ## 14 - # @TestTypeB: 15 - ## 16 6 { 'struct': 'TestTypeB', 17 7 'data': { 'integer': 'int' } } 18 - ## 19 - # @TestUnion: 20 - ## 21 8 { 'union': 'TestUnion', 22 9 'base': { 'enum1': 'TestEnum', 'string': 'str' }, 23 10 'discriminator': 'enum1',
+1 -1
tests/qapi-schema/flat-union-bad-discriminator.err
··· 1 - tests/qapi-schema/flat-union-bad-discriminator.json:27: Discriminator of flat union 'TestUnion' requires a string name 1 + tests/qapi-schema/flat-union-bad-discriminator.json:11: Discriminator of flat union 'TestUnion' requires a string name
-16
tests/qapi-schema/flat-union-bad-discriminator.json
··· 1 1 # we require the discriminator to be a string naming a base-type member 2 2 # this tests the old syntax for anonymous unions before we added alternates 3 - 4 - ## 5 - # @TestEnum: 6 - ## 7 3 { 'enum': 'TestEnum', 8 4 'data': [ 'value1', 'value2' ] } 9 - ## 10 - # @TestBase: 11 - ## 12 5 { 'struct': 'TestBase', 13 6 'data': { 'enum1': 'TestEnum', 'kind': 'str' } } 14 - ## 15 - # @TestTypeA: 16 - ## 17 7 { 'struct': 'TestTypeA', 18 8 'data': { 'string': 'str' } } 19 - ## 20 - # @TestTypeB: 21 - ## 22 9 { 'struct': 'TestTypeB', 23 10 'data': { 'integer': 'int' } } 24 - ## 25 - # @TestUnion: 26 - ## 27 11 { 'union': 'TestUnion', 28 12 'base': 'TestBase', 29 13 'discriminator': {},
+1 -1
tests/qapi-schema/flat-union-base-any.err
··· 1 - tests/qapi-schema/flat-union-base-any.json:21: 'base' for union 'TestUnion' cannot use built-in type 'any' 1 + tests/qapi-schema/flat-union-base-any.json:8: 'base' for union 'TestUnion' cannot use built-in type 'any'
-13
tests/qapi-schema/flat-union-base-any.json
··· 1 1 # we require the base to be an existing struct 2 - 3 - ## 4 - # @TestEnum: 5 - ## 6 2 { 'enum': 'TestEnum', 7 3 'data': [ 'value1', 'value2' ] } 8 - ## 9 - # @TestTypeA: 10 - ## 11 4 { 'struct': 'TestTypeA', 12 5 'data': { 'string': 'str' } } 13 - ## 14 - # @TestTypeB: 15 - ## 16 6 { 'struct': 'TestTypeB', 17 7 'data': { 'integer': 'int' } } 18 - ## 19 - # @TestUnion: 20 - ## 21 8 { 'union': 'TestUnion', 22 9 'base': 'any', 23 10 'discriminator': 'enum1',
+1 -1
tests/qapi-schema/flat-union-base-union.err
··· 1 - tests/qapi-schema/flat-union-base-union.json:30: 'base' for union 'TestUnion' cannot use union type 'UnionBase' 1 + tests/qapi-schema/flat-union-base-union.json:14: 'base' for union 'TestUnion' cannot use union type 'UnionBase'
-16
tests/qapi-schema/flat-union-base-union.json
··· 2 2 # TODO: It would be possible to allow a union as a base, as long as all 3 3 # permutations of QMP names exposed by base do not clash with any QMP 4 4 # member names added by local variants. 5 - 6 - ## 7 - # @TestEnum: 8 - ## 9 5 { 'enum': 'TestEnum', 10 6 'data': [ 'value1', 'value2' ] } 11 - ## 12 - # @TestTypeA: 13 - ## 14 7 { 'struct': 'TestTypeA', 15 8 'data': { 'string': 'str' } } 16 - ## 17 - # @TestTypeB: 18 - ## 19 9 { 'struct': 'TestTypeB', 20 10 'data': { 'integer': 'int' } } 21 - ## 22 - # @UnionBase: 23 - ## 24 11 { 'union': 'UnionBase', 25 12 'data': { 'kind1': 'TestTypeA', 26 13 'kind2': 'TestTypeB' } } 27 - ## 28 - # @TestUnion: 29 - ## 30 14 { 'union': 'TestUnion', 31 15 'base': 'UnionBase', 32 16 'discriminator': 'type',
+1 -1
tests/qapi-schema/flat-union-clash-member.err
··· 1 - tests/qapi-schema/flat-union-clash-member.json:27: 'name' (member of Branch1) collides with 'name' (member of Base) 1 + tests/qapi-schema/flat-union-clash-member.json:11: 'name' (member of Branch1) collides with 'name' (member of Base)
-16
tests/qapi-schema/flat-union-clash-member.json
··· 1 1 # We check for no duplicate keys between branch members and base 2 2 # base's member 'name' clashes with Branch1's 3 - 4 - ## 5 - # @TestEnum: 6 - ## 7 3 { 'enum': 'TestEnum', 8 4 'data': [ 'value1', 'value2' ] } 9 - ## 10 - # @Base: 11 - ## 12 5 { 'struct': 'Base', 13 6 'data': { 'enum1': 'TestEnum', '*name': 'str' } } 14 - ## 15 - # @Branch1: 16 - ## 17 7 { 'struct': 'Branch1', 18 8 'data': { 'name': 'str' } } 19 - ## 20 - # @Branch2: 21 - ## 22 9 { 'struct': 'Branch2', 23 10 'data': { 'value': 'int' } } 24 - ## 25 - # @TestUnion: 26 - ## 27 11 { 'union': 'TestUnion', 28 12 'base': 'Base', 29 13 'discriminator': 'enum1',
+1 -1
tests/qapi-schema/flat-union-empty.err
··· 1 - tests/qapi-schema/flat-union-empty.json:14: Union 'Union' cannot have empty 'data' 1 + tests/qapi-schema/flat-union-empty.json:4: Union 'Union' cannot have empty 'data'
-10
tests/qapi-schema/flat-union-empty.json
··· 1 1 # flat unions cannot be empty 2 - 3 - ## 4 - # @Empty: 5 - ## 6 2 { 'enum': 'Empty', 'data': [ ] } 7 - ## 8 - # @Base: 9 - ## 10 3 { 'struct': 'Base', 'data': { 'type': 'Empty' } } 11 - ## 12 - # @Union: 13 - ## 14 4 { 'union': 'Union', 'base': 'Base', 'discriminator': 'type', 'data': { } }
+1 -1
tests/qapi-schema/flat-union-incomplete-branch.err
··· 1 - tests/qapi-schema/flat-union-incomplete-branch.json:16: Union 'TestUnion' data missing 'value2' branch 1 + tests/qapi-schema/flat-union-incomplete-branch.json:6: Union 'TestUnion' data missing 'value2' branch
-10
tests/qapi-schema/flat-union-incomplete-branch.json
··· 1 1 # we require all branches of the union to be covered 2 - 3 - ## 4 - # @TestEnum: 5 - ## 6 2 { 'enum': 'TestEnum', 7 3 'data': [ 'value1', 'value2' ] } 8 - ## 9 - # @TestTypeA: 10 - ## 11 4 { 'struct': 'TestTypeA', 12 5 'data': { 'string': 'str' } } 13 - ## 14 - # @TestUnion: 15 - ## 16 6 { 'union': 'TestUnion', 17 7 'base': { 'type': 'TestEnum' }, 18 8 'discriminator': 'type',
+1 -1
tests/qapi-schema/flat-union-inline.err
··· 1 - tests/qapi-schema/flat-union-inline.json:17: Member 'value1' of union 'TestUnion' should be a type name 1 + tests/qapi-schema/flat-union-inline.json:7: Member 'value1' of union 'TestUnion' should be a type name
-10
tests/qapi-schema/flat-union-inline.json
··· 1 1 # we require branches to be a struct name 2 2 # TODO: should we allow anonymous inline branch types? 3 - 4 - ## 5 - # @TestEnum: 6 - ## 7 3 { 'enum': 'TestEnum', 8 4 'data': [ 'value1', 'value2' ] } 9 - ## 10 - # @Base: 11 - ## 12 5 { 'struct': 'Base', 13 6 'data': { 'enum1': 'TestEnum', 'kind': 'str' } } 14 - ## 15 - # @TestUnion: 16 - ## 17 7 { 'union': 'TestUnion', 18 8 'base': 'Base', 19 9 'discriminator': 'enum1',
+1 -1
tests/qapi-schema/flat-union-int-branch.err
··· 1 - tests/qapi-schema/flat-union-int-branch.json:21: Member 'value1' of union 'TestUnion' cannot use built-in type 'int' 1 + tests/qapi-schema/flat-union-int-branch.json:8: Member 'value1' of union 'TestUnion' cannot use built-in type 'int'
-13
tests/qapi-schema/flat-union-int-branch.json
··· 1 1 # we require flat union branches to be a struct 2 - 3 - ## 4 - # @TestEnum: 5 - ## 6 2 { 'enum': 'TestEnum', 7 3 'data': [ 'value1', 'value2' ] } 8 - ## 9 - # @Base: 10 - ## 11 4 { 'struct': 'Base', 12 5 'data': { 'enum1': 'TestEnum' } } 13 - ## 14 - # @TestTypeB: 15 - ## 16 6 { 'struct': 'TestTypeB', 17 7 'data': { 'integer': 'int' } } 18 - ## 19 - # @TestUnion: 20 - ## 21 8 { 'union': 'TestUnion', 22 9 'base': 'Base', 23 10 'discriminator': 'enum1',
+1 -1
tests/qapi-schema/flat-union-invalid-branch-key.err
··· 1 - tests/qapi-schema/flat-union-invalid-branch-key.json:28: Discriminator value 'value_wrong' is not found in enum 'TestEnum' 1 + tests/qapi-schema/flat-union-invalid-branch-key.json:13: Discriminator value 'value_wrong' is not found in enum 'TestEnum'
-15
tests/qapi-schema/flat-union-invalid-branch-key.json
··· 1 - ## 2 - # @TestEnum: 3 - ## 4 1 { 'enum': 'TestEnum', 5 2 'data': [ 'value1', 'value2' ] } 6 3 7 - ## 8 - # @TestBase: 9 - ## 10 4 { 'struct': 'TestBase', 11 5 'data': { 'enum1': 'TestEnum' } } 12 6 13 - ## 14 - # @TestTypeA: 15 - ## 16 7 { 'struct': 'TestTypeA', 17 8 'data': { 'string': 'str' } } 18 9 19 - ## 20 - # @TestTypeB: 21 - ## 22 10 { 'struct': 'TestTypeB', 23 11 'data': { 'integer': 'int' } } 24 12 25 - ## 26 - # @TestUnion: 27 - ## 28 13 { 'union': 'TestUnion', 29 14 'base': 'TestBase', 30 15 'discriminator': 'enum1',
+1 -1
tests/qapi-schema/flat-union-invalid-discriminator.err
··· 1 - tests/qapi-schema/flat-union-invalid-discriminator.json:28: Discriminator 'enum_wrong' is not a member of base struct 'TestBase' 1 + tests/qapi-schema/flat-union-invalid-discriminator.json:13: Discriminator 'enum_wrong' is not a member of base struct 'TestBase'
-15
tests/qapi-schema/flat-union-invalid-discriminator.json
··· 1 - ## 2 - # @TestEnum: 3 - ## 4 1 { 'enum': 'TestEnum', 5 2 'data': [ 'value1', 'value2' ] } 6 3 7 - ## 8 - # @TestBase: 9 - ## 10 4 { 'struct': 'TestBase', 11 5 'data': { 'enum1': 'TestEnum' } } 12 6 13 - ## 14 - # @TestTypeA: 15 - ## 16 7 { 'struct': 'TestTypeA', 17 8 'data': { 'string': 'str' } } 18 9 19 - ## 20 - # @TestTypeB: 21 - ## 22 10 { 'struct': 'TestTypeB', 23 11 'data': { 'integer': 'int' } } 24 12 25 - ## 26 - # @TestUnion: 27 - ## 28 13 { 'union': 'TestUnion', 29 14 'base': 'TestBase', 30 15 'discriminator': 'enum_wrong',
+1 -1
tests/qapi-schema/flat-union-no-base.err
··· 1 - tests/qapi-schema/flat-union-no-base.json:22: Flat union 'TestUnion' must have a base 1 + tests/qapi-schema/flat-union-no-base.json:9: Flat union 'TestUnion' must have a base
-13
tests/qapi-schema/flat-union-no-base.json
··· 1 1 # flat unions require a base 2 2 # TODO: simple unions should be able to use an enum discriminator 3 - 4 - ## 5 - # @TestTypeA: 6 - ## 7 3 { 'struct': 'TestTypeA', 8 4 'data': { 'string': 'str' } } 9 - ## 10 - # @TestTypeB: 11 - ## 12 5 { 'struct': 'TestTypeB', 13 6 'data': { 'integer': 'int' } } 14 - ## 15 - # @Enum: 16 - ## 17 7 { 'enum': 'Enum', 18 8 'data': [ 'value1', 'value2' ] } 19 - ## 20 - # @TestUnion: 21 - ## 22 9 { 'union': 'TestUnion', 23 10 'discriminator': 'Enum', 24 11 'data': { 'value1': 'TestTypeA',
+1 -1
tests/qapi-schema/flat-union-optional-discriminator.err
··· 1 - tests/qapi-schema/flat-union-optional-discriminator.json:19: Discriminator of flat union 'MyUnion' does not allow optional name '*switch' 1 + tests/qapi-schema/flat-union-optional-discriminator.json:6: Discriminator of flat union 'MyUnion' does not allow optional name '*switch'
-13
tests/qapi-schema/flat-union-optional-discriminator.json
··· 1 1 # we require the discriminator to be non-optional 2 - 3 - ## 4 - # @Enum: 5 - ## 6 2 { 'enum': 'Enum', 'data': [ 'one', 'two' ] } 7 - ## 8 - # @Base: 9 - ## 10 3 { 'struct': 'Base', 11 4 'data': { '*switch': 'Enum' } } 12 - ## 13 - # @Branch: 14 - ## 15 5 { 'struct': 'Branch', 'data': { 'name': 'str' } } 16 - ## 17 - # @MyUnion: 18 - ## 19 6 { 'union': 'MyUnion', 20 7 'base': 'Base', 21 8 'discriminator': '*switch',
+1 -1
tests/qapi-schema/flat-union-string-discriminator.err
··· 1 - tests/qapi-schema/flat-union-string-discriminator.json:28: Discriminator 'kind' must be of enumeration type 1 + tests/qapi-schema/flat-union-string-discriminator.json:13: Discriminator 'kind' must be of enumeration type
-15
tests/qapi-schema/flat-union-string-discriminator.json
··· 1 - ## 2 - # @TestEnum: 3 - ## 4 1 { 'enum': 'TestEnum', 5 2 'data': [ 'value1', 'value2' ] } 6 3 7 - ## 8 - # @TestBase: 9 - ## 10 4 { 'struct': 'TestBase', 11 5 'data': { 'enum1': 'TestEnum', 'kind': 'str' } } 12 6 13 - ## 14 - # @TestTypeA: 15 - ## 16 7 { 'struct': 'TestTypeA', 17 8 'data': { 'string': 'str' } } 18 9 19 - ## 20 - # @TestTypeB: 21 - ## 22 10 { 'struct': 'TestTypeB', 23 11 'data': { 'integer': 'int' } } 24 12 25 - ## 26 - # @TestUnion: 27 - ## 28 13 { 'union': 'TestUnion', 29 14 'base': 'TestBase', 30 15 'discriminator': 'kind',
-4
tests/qapi-schema/ident-with-escape.json
··· 1 1 # we allow escape sequences in strings, if they map back to ASCII 2 2 # { 'command': 'fooA', 'data': { 'bar1': 'str' } } 3 - 4 - ## 5 - # @fooA: 6 - ## 7 3 { 'c\u006fmmand': '\u0066\u006f\u006FA', 8 4 'd\u0061ta': { '\u0062\u0061\u00721': '\u0073\u0074\u0072' } }
-1
tests/qapi-schema/ident-with-escape.out
··· 5 5 object q_empty 6 6 object q_obj_fooA-arg 7 7 member bar1: str optional=False 8 - doc symbol=fooA expr=('command', 'fooA')
-3
tests/qapi-schema/include-relpath-sub.json
··· 1 - ## 2 - # @Status: 3 - ## 4 1 { 'enum': 'Status', 5 2 'data': [ 'good', 'bad', 'ugly' ] }
-1
tests/qapi-schema/include-relpath.out
··· 2 2 prefix QTYPE 3 3 enum Status ['good', 'bad', 'ugly'] 4 4 object q_empty 5 - doc symbol=Status expr=('enum', 'Status')
-1
tests/qapi-schema/include-repetition.out
··· 2 2 prefix QTYPE 3 3 enum Status ['good', 'bad', 'ugly'] 4 4 object q_empty 5 - doc symbol=Status expr=('enum', 'Status')
-3
tests/qapi-schema/include-simple-sub.json
··· 1 - ## 2 - # @Status: 3 - ## 4 1 { 'enum': 'Status', 5 2 'data': [ 'good', 'bad', 'ugly' ] }
-1
tests/qapi-schema/include-simple.out
··· 2 2 prefix QTYPE 3 3 enum Status ['good', 'bad', 'ugly'] 4 4 object q_empty 5 - doc symbol=Status expr=('enum', 'Status')
-6
tests/qapi-schema/indented-expr.json
··· 1 - ## 2 - # @eins: 3 - ## 4 1 { 'command' : 'eins' } 5 - ## 6 - # @zwei: 7 - ## 8 2 { 'command' : 'zwei' }
-2
tests/qapi-schema/indented-expr.out
··· 5 5 object q_empty 6 6 command zwei None -> None 7 7 gen=True success_response=True boxed=False 8 - doc symbol=eins expr=('command', 'eins') 9 - doc symbol=zwei expr=('command', 'zwei')
+1 -1
tests/qapi-schema/missing-type.err
··· 1 - tests/qapi-schema/missing-type.json:6: Expression is missing metatype 1 + tests/qapi-schema/missing-type.json:2: Expression is missing metatype
-4
tests/qapi-schema/missing-type.json
··· 1 1 # we reject an expression with missing metatype 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'data': { } }
+1 -1
tests/qapi-schema/nested-struct-data.err
··· 1 - tests/qapi-schema/nested-struct-data.json:6: Member 'a' of 'data' for command 'foo' should be a type name 1 + tests/qapi-schema/nested-struct-data.json:2: Member 'a' of 'data' for command 'foo' should be a type name
-4
tests/qapi-schema/nested-struct-data.json
··· 1 1 # inline subtypes collide with our desired future use of defaults 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'command': 'foo', 7 3 'data': { 'a' : { 'string' : 'str', 'integer': 'int' }, 'b' : 'str' } }
-213
tests/qapi-schema/qapi-schema-test.json
··· 3 3 # This file is a stress test of supported qapi constructs that must 4 4 # parse and compile correctly. 5 5 6 - ## 7 - # = Section 8 - # == subsection 9 - # 10 - # Some text foo with *strong* and _emphasis_ 11 - # 1. with a list 12 - # 2. like that @foo 13 - # 14 - # And some code: 15 - # | $ echo foo 16 - # | -> do this 17 - # | <- get that 18 - # 19 - # Note: is not a meta 20 - ## 21 - 22 - ## 23 - # @TestStruct: 24 - # 25 - # body with @var 26 - # 27 - # @integer: foo 28 - # blah 29 - # 30 - # bao 31 - # 32 - # @boolean: bar 33 - # @string: baz 34 - # 35 - # Example: 36 - # 37 - # -> { "execute": ... } 38 - # <- { "return": ... } 39 - # 40 - # Since: 2.3 41 - # Note: a note 42 - # 43 - ## 44 6 { 'struct': 'TestStruct', 45 7 'data': { 'integer': 'int', 'boolean': 'bool', 'string': 'str' } } 46 8 47 - ## 48 - # @NestedEnumsOne: 49 9 # for testing enums 50 - ## 51 10 { 'struct': 'NestedEnumsOne', 52 11 'data': { 'enum1': 'EnumOne', # Intentional forward reference 53 12 '*enum2': 'EnumOne', 'enum3': 'EnumOne', '*enum4': 'EnumOne' } } 54 13 55 - ## 56 - # @MyEnum: 57 14 # An empty enum, although unusual, is currently acceptable 58 - ## 59 15 { 'enum': 'MyEnum', 'data': [ ] } 60 16 61 - ## 62 - # @Empty1: 63 17 # Likewise for an empty struct, including an empty base 64 - ## 65 18 { 'struct': 'Empty1', 'data': { } } 66 - ## 67 - # @Empty2: 68 - ## 69 19 { 'struct': 'Empty2', 'base': 'Empty1', 'data': { } } 70 20 71 - ## 72 - # @user_def_cmd0: 73 - ## 74 21 { 'command': 'user_def_cmd0', 'data': 'Empty2', 'returns': 'Empty2' } 75 22 76 - ## 77 - # @QEnumTwo: 78 23 # for testing override of default naming heuristic 79 - ## 80 24 { 'enum': 'QEnumTwo', 81 25 'prefix': 'QENUM_TWO', 82 26 'data': [ 'value1', 'value2' ] } 83 27 84 - ## 85 - # @UserDefOne: 86 28 # for testing nested structs 87 - ## 88 29 { 'struct': 'UserDefOne', 89 30 'base': 'UserDefZero', # intentional forward reference 90 31 'data': { 'string': 'str', 91 32 '*enum1': 'EnumOne' } } # intentional forward reference 92 33 93 - ## 94 - # @EnumOne: 95 - ## 96 34 { 'enum': 'EnumOne', 97 35 'data': [ 'value1', 'value2', 'value3' ] } 98 36 99 - ## 100 - # @UserDefZero: 101 - ## 102 37 { 'struct': 'UserDefZero', 103 38 'data': { 'integer': 'int' } } 104 39 105 - ## 106 - # @UserDefTwoDictDict: 107 - ## 108 40 { 'struct': 'UserDefTwoDictDict', 109 41 'data': { 'userdef': 'UserDefOne', 'string': 'str' } } 110 42 111 - ## 112 - # @UserDefTwoDict: 113 - ## 114 43 { 'struct': 'UserDefTwoDict', 115 44 'data': { 'string1': 'str', 116 45 'dict2': 'UserDefTwoDictDict', 117 46 '*dict3': 'UserDefTwoDictDict' } } 118 47 119 - ## 120 - # @UserDefTwo: 121 - ## 122 48 { 'struct': 'UserDefTwo', 123 49 'data': { 'string0': 'str', 124 50 'dict1': 'UserDefTwoDict' } } 125 51 126 - ## 127 - # @ForceArrays: 128 52 # dummy struct to force generation of array types not otherwise mentioned 129 - ## 130 53 { 'struct': 'ForceArrays', 131 54 'data': { 'unused1':['UserDefOne'], 'unused2':['UserDefTwo'], 132 55 'unused3':['TestStruct'] } } 133 56 134 - ## 135 - # @UserDefA: 136 57 # for testing unions 137 58 # Among other things, test that a name collision between branches does 138 59 # not cause any problems (since only one branch can be in use at a time), 139 60 # by intentionally using two branches that both have a C member 'a_b' 140 - ## 141 61 { 'struct': 'UserDefA', 142 62 'data': { 'boolean': 'bool', '*a_b': 'int' } } 143 63 144 - ## 145 - # @UserDefB: 146 - ## 147 64 { 'struct': 'UserDefB', 148 65 'data': { 'intb': 'int', '*a-b': 'bool' } } 149 66 150 - ## 151 - # @UserDefFlatUnion: 152 - ## 153 67 { 'union': 'UserDefFlatUnion', 154 68 'base': 'UserDefUnionBase', # intentional forward reference 155 69 'discriminator': 'enum1', ··· 157 71 'value2' : 'UserDefB', 158 72 'value3' : 'UserDefB' } } 159 73 160 - ## 161 - # @UserDefUnionBase: 162 - ## 163 74 { 'struct': 'UserDefUnionBase', 164 75 'base': 'UserDefZero', 165 76 'data': { 'string': 'str', 'enum1': 'EnumOne' } } 166 77 167 - ## 168 - # @UserDefFlatUnion2: 169 78 # this variant of UserDefFlatUnion defaults to a union that uses members with 170 79 # allocated types to test corner cases in the cleanup/dealloc visitor 171 - ## 172 80 { 'union': 'UserDefFlatUnion2', 173 81 'base': { '*integer': 'int', 'string': 'str', 'enum1': 'QEnumTwo' }, 174 82 'discriminator': 'enum1', 175 83 'data': { 'value1' : 'UserDefC', # intentional forward reference 176 84 'value2' : 'UserDefB' } } 177 85 178 - ## 179 - # @WrapAlternate: 180 - ## 181 86 { 'struct': 'WrapAlternate', 182 87 'data': { 'alt': 'UserDefAlternate' } } 183 - ## 184 - # @UserDefAlternate: 185 - ## 186 88 { 'alternate': 'UserDefAlternate', 187 89 'data': { 'udfu': 'UserDefFlatUnion', 's': 'str', 'i': 'int' } } 188 90 189 - ## 190 - # @UserDefC: 191 - ## 192 91 { 'struct': 'UserDefC', 193 92 'data': { 'string1': 'str', 'string2': 'str' } } 194 93 195 94 # for testing use of 'number' within alternates 196 - ## 197 - # @AltStrBool: 198 - ## 199 95 { 'alternate': 'AltStrBool', 'data': { 's': 'str', 'b': 'bool' } } 200 - ## 201 - # @AltStrNum: 202 - ## 203 96 { 'alternate': 'AltStrNum', 'data': { 's': 'str', 'n': 'number' } } 204 - ## 205 - # @AltNumStr: 206 - ## 207 97 { 'alternate': 'AltNumStr', 'data': { 'n': 'number', 's': 'str' } } 208 - ## 209 - # @AltStrInt: 210 - ## 211 98 { 'alternate': 'AltStrInt', 'data': { 's': 'str', 'i': 'int' } } 212 - ## 213 - # @AltIntNum: 214 - ## 215 99 { 'alternate': 'AltIntNum', 'data': { 'i': 'int', 'n': 'number' } } 216 - ## 217 - # @AltNumInt: 218 - ## 219 100 { 'alternate': 'AltNumInt', 'data': { 'n': 'number', 'i': 'int' } } 220 101 221 - ## 222 - # @UserDefNativeListUnion: 223 102 # for testing native lists 224 - ## 225 103 { 'union': 'UserDefNativeListUnion', 226 104 'data': { 'integer': ['int'], 227 105 's8': ['int8'], ··· 239 117 'any': ['any'] } } 240 118 241 119 # testing commands 242 - ## 243 - # @user_def_cmd: 244 - ## 245 120 { 'command': 'user_def_cmd', 'data': {} } 246 - ## 247 - # @user_def_cmd1: 248 - ## 249 121 { 'command': 'user_def_cmd1', 'data': {'ud1a': 'UserDefOne'} } 250 - ## 251 - # @user_def_cmd2: 252 - ## 253 122 { 'command': 'user_def_cmd2', 254 123 'data': {'ud1a': 'UserDefOne', '*ud1b': 'UserDefOne'}, 255 124 'returns': 'UserDefTwo' } 256 125 257 - ## 258 - # Another comment 259 - ## 260 - 261 - ## 262 - # @guest-get-time: 263 - # 264 - # @guest-get-time body 265 - # 266 - # @a: an integer 267 - # @b: #optional integer 268 - # 269 - # Returns: returns something 270 - # 271 - # Example: 272 - # 273 - # -> { "execute": "guest-get-time", ... } 274 - # <- { "return": "42" } 275 - # 276 - ## 277 - 278 126 # Returning a non-dictionary requires a name from the whitelist 279 127 { 'command': 'guest-get-time', 'data': {'a': 'int', '*b': 'int' }, 280 128 'returns': 'int' } 281 - ## 282 - # @guest-sync: 283 - ## 284 129 { 'command': 'guest-sync', 'data': { 'arg': 'any' }, 'returns': 'any' } 285 - ## 286 - # @boxed-struct: 287 - ## 288 130 { 'command': 'boxed-struct', 'boxed': true, 'data': 'UserDefZero' } 289 - ## 290 - # @boxed-union: 291 - ## 292 131 { 'command': 'boxed-union', 'data': 'UserDefNativeListUnion', 'boxed': true } 293 132 294 - ## 295 - # @UserDefOptions: 296 - # 297 133 # For testing integer range flattening in opts-visitor. The following schema 298 134 # corresponds to the option format: 299 135 # ··· 301 137 # 302 138 # For simplicity, this example doesn't use [type=]discriminator nor optargs 303 139 # specific to discriminator values. 304 - ## 305 140 { 'struct': 'UserDefOptions', 306 141 'data': { 307 142 '*i64' : [ 'int' ], ··· 311 146 '*u64x': 'uint64' } } 312 147 313 148 # testing event 314 - ## 315 - # @EventStructOne: 316 - ## 317 149 { 'struct': 'EventStructOne', 318 150 'data': { 'struct1': 'UserDefOne', 'string': 'str', '*enum2': 'EnumOne' } } 319 151 320 - ## 321 - # @EVENT_A: 322 - ## 323 152 { 'event': 'EVENT_A' } 324 - ## 325 - # @EVENT_B: 326 - ## 327 153 { 'event': 'EVENT_B', 328 154 'data': { } } 329 - ## 330 - # @EVENT_C: 331 - ## 332 155 { 'event': 'EVENT_C', 333 156 'data': { '*a': 'int', '*b': 'UserDefOne', 'c': 'str' } } 334 - ## 335 - # @EVENT_D: 336 - ## 337 157 { 'event': 'EVENT_D', 338 158 'data': { 'a' : 'EventStructOne', 'b' : 'str', '*c': 'str', '*enum3': 'EnumOne' } } 339 - ## 340 - # @EVENT_E: 341 - ## 342 159 { 'event': 'EVENT_E', 'boxed': true, 'data': 'UserDefZero' } 343 - ## 344 - # @EVENT_F: 345 - ## 346 160 { 'event': 'EVENT_F', 'boxed': true, 'data': 'UserDefAlternate' } 347 161 348 162 # test that we correctly compile downstream extensions, as well as munge 349 163 # ticklish names 350 - ## 351 - # @__org.qemu_x-Enum: 352 - ## 353 164 { 'enum': '__org.qemu_x-Enum', 'data': [ '__org.qemu_x-value' ] } 354 - ## 355 - # @__org.qemu_x-Base: 356 - ## 357 165 { 'struct': '__org.qemu_x-Base', 358 166 'data': { '__org.qemu_x-member1': '__org.qemu_x-Enum' } } 359 - ## 360 - # @__org.qemu_x-Struct: 361 - ## 362 167 { 'struct': '__org.qemu_x-Struct', 'base': '__org.qemu_x-Base', 363 168 'data': { '__org.qemu_x-member2': 'str', '*wchar-t': 'int' } } 364 - ## 365 - # @__org.qemu_x-Union1: 366 - ## 367 169 { 'union': '__org.qemu_x-Union1', 'data': { '__org.qemu_x-branch': 'str' } } 368 - ## 369 - # @__org.qemu_x-Struct2: 370 - ## 371 170 { 'struct': '__org.qemu_x-Struct2', 372 171 'data': { 'array': ['__org.qemu_x-Union1'] } } 373 - ## 374 - # @__org.qemu_x-Union2: 375 - ## 376 172 { 'union': '__org.qemu_x-Union2', 'base': '__org.qemu_x-Base', 377 173 'discriminator': '__org.qemu_x-member1', 378 174 'data': { '__org.qemu_x-value': '__org.qemu_x-Struct2' } } 379 - ## 380 - # @__org.qemu_x-Alt: 381 - ## 382 175 { 'alternate': '__org.qemu_x-Alt', 383 176 'data': { '__org.qemu_x-branch': 'str', 'b': '__org.qemu_x-Base' } } 384 - ## 385 - # @__ORG.QEMU_X-EVENT: 386 - ## 387 177 { 'event': '__ORG.QEMU_X-EVENT', 'data': '__org.qemu_x-Struct' } 388 - ## 389 - # @__org.qemu_x-command: 390 - ## 391 178 { 'command': '__org.qemu_x-command', 392 179 'data': { 'a': ['__org.qemu_x-Enum'], 'b': ['__org.qemu_x-Struct'], 393 180 'c': '__org.qemu_x-Union2', 'd': '__org.qemu_x-Alt' },
-130
tests/qapi-schema/qapi-schema-test.out
··· 232 232 gen=True success_response=True boxed=False 233 233 command user_def_cmd2 q_obj_user_def_cmd2-arg -> UserDefTwo 234 234 gen=True success_response=True boxed=False 235 - doc freeform 236 - body= 237 - = Section 238 - == subsection 239 - 240 - Some text foo with *strong* and _emphasis_ 241 - 1. with a list 242 - 2. like that @foo 243 - 244 - And some code: 245 - | $ echo foo 246 - | -> do this 247 - | <- get that 248 - 249 - Note: is not a meta 250 - doc symbol=TestStruct expr=('struct', 'TestStruct') 251 - arg=integer 252 - foo 253 - blah 254 - 255 - bao 256 - arg=boolean 257 - bar 258 - arg=string 259 - baz 260 - section=Example 261 - -> { "execute": ... } 262 - <- { "return": ... } 263 - section=Since 264 - 2.3 265 - section=Note 266 - a note 267 - body= 268 - body with @var 269 - doc symbol=NestedEnumsOne expr=('struct', 'NestedEnumsOne') 270 - body= 271 - for testing enums 272 - doc symbol=MyEnum expr=('enum', 'MyEnum') 273 - body= 274 - An empty enum, although unusual, is currently acceptable 275 - doc symbol=Empty1 expr=('struct', 'Empty1') 276 - body= 277 - Likewise for an empty struct, including an empty base 278 - doc symbol=Empty2 expr=('struct', 'Empty2') 279 - doc symbol=user_def_cmd0 expr=('command', 'user_def_cmd0') 280 - doc symbol=QEnumTwo expr=('enum', 'QEnumTwo') 281 - body= 282 - for testing override of default naming heuristic 283 - doc symbol=UserDefOne expr=('struct', 'UserDefOne') 284 - body= 285 - for testing nested structs 286 - doc symbol=EnumOne expr=('enum', 'EnumOne') 287 - doc symbol=UserDefZero expr=('struct', 'UserDefZero') 288 - doc symbol=UserDefTwoDictDict expr=('struct', 'UserDefTwoDictDict') 289 - doc symbol=UserDefTwoDict expr=('struct', 'UserDefTwoDict') 290 - doc symbol=UserDefTwo expr=('struct', 'UserDefTwo') 291 - doc symbol=ForceArrays expr=('struct', 'ForceArrays') 292 - body= 293 - dummy struct to force generation of array types not otherwise mentioned 294 - doc symbol=UserDefA expr=('struct', 'UserDefA') 295 - body= 296 - for testing unions 297 - Among other things, test that a name collision between branches does 298 - not cause any problems (since only one branch can be in use at a time), 299 - by intentionally using two branches that both have a C member 'a_b' 300 - doc symbol=UserDefB expr=('struct', 'UserDefB') 301 - doc symbol=UserDefFlatUnion expr=('union', 'UserDefFlatUnion') 302 - doc symbol=UserDefUnionBase expr=('struct', 'UserDefUnionBase') 303 - doc symbol=UserDefFlatUnion2 expr=('union', 'UserDefFlatUnion2') 304 - body= 305 - this variant of UserDefFlatUnion defaults to a union that uses members with 306 - allocated types to test corner cases in the cleanup/dealloc visitor 307 - doc symbol=WrapAlternate expr=('struct', 'WrapAlternate') 308 - doc symbol=UserDefAlternate expr=('alternate', 'UserDefAlternate') 309 - doc symbol=UserDefC expr=('struct', 'UserDefC') 310 - doc symbol=AltStrBool expr=('alternate', 'AltStrBool') 311 - doc symbol=AltStrNum expr=('alternate', 'AltStrNum') 312 - doc symbol=AltNumStr expr=('alternate', 'AltNumStr') 313 - doc symbol=AltStrInt expr=('alternate', 'AltStrInt') 314 - doc symbol=AltIntNum expr=('alternate', 'AltIntNum') 315 - doc symbol=AltNumInt expr=('alternate', 'AltNumInt') 316 - doc symbol=UserDefNativeListUnion expr=('union', 'UserDefNativeListUnion') 317 - body= 318 - for testing native lists 319 - doc symbol=user_def_cmd expr=('command', 'user_def_cmd') 320 - doc symbol=user_def_cmd1 expr=('command', 'user_def_cmd1') 321 - doc symbol=user_def_cmd2 expr=('command', 'user_def_cmd2') 322 - doc freeform 323 - body= 324 - Another comment 325 - doc symbol=guest-get-time expr=('command', 'guest-get-time') 326 - arg=a 327 - an integer 328 - arg=b 329 - #optional integer 330 - section=Returns 331 - returns something 332 - section=Example 333 - -> { "execute": "guest-get-time", ... } 334 - <- { "return": "42" } 335 - body= 336 - @guest-get-time body 337 - doc symbol=guest-sync expr=('command', 'guest-sync') 338 - doc symbol=boxed-struct expr=('command', 'boxed-struct') 339 - doc symbol=boxed-union expr=('command', 'boxed-union') 340 - doc symbol=UserDefOptions expr=('struct', 'UserDefOptions') 341 - body= 342 - For testing integer range flattening in opts-visitor. The following schema 343 - corresponds to the option format: 344 - 345 - -userdef i64=3-6,i64=-5--1,u64=2,u16=1,u16=7-12 346 - 347 - For simplicity, this example doesn't use [type=]discriminator nor optargs 348 - specific to discriminator values. 349 - doc symbol=EventStructOne expr=('struct', 'EventStructOne') 350 - doc symbol=EVENT_A expr=('event', 'EVENT_A') 351 - doc symbol=EVENT_B expr=('event', 'EVENT_B') 352 - doc symbol=EVENT_C expr=('event', 'EVENT_C') 353 - doc symbol=EVENT_D expr=('event', 'EVENT_D') 354 - doc symbol=EVENT_E expr=('event', 'EVENT_E') 355 - doc symbol=EVENT_F expr=('event', 'EVENT_F') 356 - doc symbol=__org.qemu_x-Enum expr=('enum', '__org.qemu_x-Enum') 357 - doc symbol=__org.qemu_x-Base expr=('struct', '__org.qemu_x-Base') 358 - doc symbol=__org.qemu_x-Struct expr=('struct', '__org.qemu_x-Struct') 359 - doc symbol=__org.qemu_x-Union1 expr=('union', '__org.qemu_x-Union1') 360 - doc symbol=__org.qemu_x-Struct2 expr=('struct', '__org.qemu_x-Struct2') 361 - doc symbol=__org.qemu_x-Union2 expr=('union', '__org.qemu_x-Union2') 362 - doc symbol=__org.qemu_x-Alt expr=('alternate', '__org.qemu_x-Alt') 363 - doc symbol=__ORG.QEMU_X-EVENT expr=('event', '__ORG.QEMU_X-EVENT') 364 - doc symbol=__org.qemu_x-command expr=('command', '__org.qemu_x-command')
+1 -1
tests/qapi-schema/redefined-builtin.err
··· 1 - tests/qapi-schema/redefined-builtin.json:6: built-in 'size' is already defined 1 + tests/qapi-schema/redefined-builtin.json:2: built-in 'size' is already defined
-4
tests/qapi-schema/redefined-builtin.json
··· 1 1 # we reject types that duplicate builtin names 2 - 3 - ## 4 - # @size: 5 - ## 6 2 { 'struct': 'size', 'data': { 'myint': 'size' } }
+1 -1
tests/qapi-schema/redefined-command.err
··· 1 - tests/qapi-schema/redefined-command.json:10: command 'foo' is already defined 1 + tests/qapi-schema/redefined-command.json:3: command 'foo' is already defined
-7
tests/qapi-schema/redefined-command.json
··· 1 1 # we reject commands defined more than once 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'command': 'foo', 'data': { 'one': 'str' } } 7 - ## 8 - # @foo: 9 - ## 10 3 { 'command': 'foo', 'data': { '*two': 'str' } }
+1 -1
tests/qapi-schema/redefined-event.err
··· 1 - tests/qapi-schema/redefined-event.json:10: event 'EVENT_A' is already defined 1 + tests/qapi-schema/redefined-event.json:3: event 'EVENT_A' is already defined
-7
tests/qapi-schema/redefined-event.json
··· 1 1 # we reject duplicate events 2 - 3 - ## 4 - # @EVENT_A: 5 - ## 6 2 { 'event': 'EVENT_A', 'data': { 'myint': 'int' } } 7 - ## 8 - # @EVENT_A: 9 - ## 10 3 { 'event': 'EVENT_A', 'data': { 'myint': 'int' } }
+1 -1
tests/qapi-schema/redefined-type.err
··· 1 - tests/qapi-schema/redefined-type.json:10: struct 'foo' is already defined 1 + tests/qapi-schema/redefined-type.json:3: struct 'foo' is already defined
-7
tests/qapi-schema/redefined-type.json
··· 1 1 # we reject types defined more than once 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'struct': 'foo', 'data': { 'one': 'str' } } 7 - ## 8 - # @foo: 9 - ## 10 3 { 'enum': 'foo', 'data': [ 'two' ] }
+1 -1
tests/qapi-schema/reserved-command-q.err
··· 1 - tests/qapi-schema/reserved-command-q.json:12: 'command' uses invalid name 'q-unix' 1 + tests/qapi-schema/reserved-command-q.json:5: 'command' uses invalid name 'q-unix'
-7
tests/qapi-schema/reserved-command-q.json
··· 1 1 # C entity name collision 2 2 # We reject names like 'q-unix', because they can collide with the mangled 3 3 # name for 'unix' in generated C. 4 - 5 - ## 6 - # @unix: 7 - ## 8 4 { 'command': 'unix' } 9 - ## 10 - # @q-unix: 11 - ## 12 5 { 'command': 'q-unix' }
+1 -1
tests/qapi-schema/reserved-enum-q.err
··· 1 - tests/qapi-schema/reserved-enum-q.json:8: Member of enum 'Foo' uses invalid name 'q-Unix' 1 + tests/qapi-schema/reserved-enum-q.json:4: Member of enum 'Foo' uses invalid name 'q-Unix'
-4
tests/qapi-schema/reserved-enum-q.json
··· 1 1 # C entity name collision 2 2 # We reject names like 'q-unix', because they can collide with the mangled 3 3 # name for 'unix' in generated C. 4 - 5 - ## 6 - # @Foo: 7 - ## 8 4 { 'enum': 'Foo', 'data': [ 'unix', 'q-Unix' ] }
+1 -1
tests/qapi-schema/reserved-member-has.err
··· 1 - tests/qapi-schema/reserved-member-has.json:9: Member of 'data' for command 'oops' uses reserved name 'has-a' 1 + tests/qapi-schema/reserved-member-has.json:5: Member of 'data' for command 'oops' uses reserved name 'has-a'
-4
tests/qapi-schema/reserved-member-has.json
··· 2 2 # We reject names like 'has-a', because they can collide with the flag 3 3 # for an optional 'a' in generated C. 4 4 # TODO we could munge the optional flag name to avoid the collision. 5 - 6 - ## 7 - # @oops: 8 - ## 9 5 { 'command': 'oops', 'data': { '*a': 'str', 'has-a': 'str' } }
+1 -1
tests/qapi-schema/reserved-member-q.err
··· 1 - tests/qapi-schema/reserved-member-q.json:8: Member of 'data' for struct 'Foo' uses invalid name 'q-unix' 1 + tests/qapi-schema/reserved-member-q.json:4: Member of 'data' for struct 'Foo' uses invalid name 'q-unix'
-4
tests/qapi-schema/reserved-member-q.json
··· 1 1 # C member name collision 2 2 # We reject names like 'q-unix', because they can collide with the mangled 3 3 # name for 'unix' in generated C. 4 - 5 - ## 6 - # @Foo: 7 - ## 8 4 { 'struct': 'Foo', 'data': { 'unix':'int', 'q-unix':'bool' } }
+1 -1
tests/qapi-schema/reserved-member-u.err
··· 1 - tests/qapi-schema/reserved-member-u.json:11: Member of 'data' for struct 'Oops' uses reserved name 'u' 1 + tests/qapi-schema/reserved-member-u.json:7: Member of 'data' for struct 'Oops' uses reserved name 'u'
-4
tests/qapi-schema/reserved-member-u.json
··· 4 4 # This is true even for non-unions, because it is possible to convert a 5 5 # struct to flat union while remaining backwards compatible in QMP. 6 6 # TODO - we could munge the member name to 'q_u' to avoid the collision 7 - 8 - ## 9 - # @Oops: 10 - ## 11 7 { 'struct': 'Oops', 'data': { 'u': 'str' } }
+1 -1
tests/qapi-schema/reserved-member-underscore.err
··· 1 - tests/qapi-schema/reserved-member-underscore.json:8: Member of 'data' for struct 'Oops' uses invalid name '_oops' 1 + tests/qapi-schema/reserved-member-underscore.json:4: Member of 'data' for struct 'Oops' uses invalid name '_oops'
-4
tests/qapi-schema/reserved-member-underscore.json
··· 1 1 # C member name collision 2 2 # We reject use of a single leading underscore in all names (names must 3 3 # begin with a letter or a downstream extension double-underscore prefix). 4 - 5 - ## 6 - # @Oops: 7 - ## 8 4 { 'struct': 'Oops', 'data': { '_oops': 'str' } }
+1 -1
tests/qapi-schema/reserved-type-kind.err
··· 1 - tests/qapi-schema/reserved-type-kind.json:6: enum 'UnionKind' should not end in 'Kind' 1 + tests/qapi-schema/reserved-type-kind.json:2: enum 'UnionKind' should not end in 'Kind'
-4
tests/qapi-schema/reserved-type-kind.json
··· 1 1 # we reject types that would conflict with implicit union enum 2 - 3 - ## 4 - # @UnionKind: 5 - ## 6 2 { 'enum': 'UnionKind', 'data': [ 'oops' ] }
+1 -1
tests/qapi-schema/reserved-type-list.err
··· 1 - tests/qapi-schema/reserved-type-list.json:9: struct 'FooList' should not end in 'List' 1 + tests/qapi-schema/reserved-type-list.json:5: struct 'FooList' should not end in 'List'
-4
tests/qapi-schema/reserved-type-list.json
··· 2 2 # We reserve names ending in 'List' for use by array types. 3 3 # TODO - we could choose array names to avoid collision with user types, 4 4 # in order to let this compile 5 - 6 - ## 7 - # @FooList: 8 - ## 9 5 { 'struct': 'FooList', 'data': { 's': 'str' } }
+1 -1
tests/qapi-schema/returns-alternate.err
··· 1 - tests/qapi-schema/returns-alternate.json:10: 'returns' for command 'oops' cannot use alternate type 'Alt' 1 + tests/qapi-schema/returns-alternate.json:3: 'returns' for command 'oops' cannot use alternate type 'Alt'
-7
tests/qapi-schema/returns-alternate.json
··· 1 1 # we reject returns if it is an alternate type 2 - 3 - ## 4 - # @Alt: 5 - ## 6 2 { 'alternate': 'Alt', 'data': { 'a': 'int', 'b': 'str' } } 7 - ## 8 - # @oops: 9 - ## 10 3 { 'command': 'oops', 'returns': 'Alt' }
+1 -1
tests/qapi-schema/returns-array-bad.err
··· 1 - tests/qapi-schema/returns-array-bad.json:6: 'returns' for command 'oops': array type must contain single type name 1 + tests/qapi-schema/returns-array-bad.json:2: 'returns' for command 'oops': array type must contain single type name
-4
tests/qapi-schema/returns-array-bad.json
··· 1 1 # we reject an array return that is not a single type 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'returns': [ 'str', 'str' ] }
+1 -1
tests/qapi-schema/returns-dict.err
··· 1 - tests/qapi-schema/returns-dict.json:6: 'returns' for command 'oops' should be a type name 1 + tests/qapi-schema/returns-dict.json:2: 'returns' for command 'oops' should be a type name
-4
tests/qapi-schema/returns-dict.json
··· 1 1 # we reject inline struct return type 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'returns': { 'a': 'str' } }
+1 -1
tests/qapi-schema/returns-unknown.err
··· 1 - tests/qapi-schema/returns-unknown.json:6: 'returns' for command 'oops' uses unknown type 'NoSuchType' 1 + tests/qapi-schema/returns-unknown.json:2: 'returns' for command 'oops' uses unknown type 'NoSuchType'
-4
tests/qapi-schema/returns-unknown.json
··· 1 1 # we reject returns if it does not contain a known type 2 - 3 - ## 4 - # @oops: 5 - ## 6 2 { 'command': 'oops', 'returns': 'NoSuchType' }
+1 -1
tests/qapi-schema/returns-whitelist.err
··· 1 - tests/qapi-schema/returns-whitelist.json:26: 'returns' for command 'no-way-this-will-get-whitelisted' cannot use built-in type 'int' 1 + tests/qapi-schema/returns-whitelist.json:10: 'returns' for command 'no-way-this-will-get-whitelisted' cannot use built-in type 'int'
-16
tests/qapi-schema/returns-whitelist.json
··· 1 1 # we enforce that 'returns' be a dict or array of dict unless whitelisted 2 - 3 - ## 4 - # @human-monitor-command: 5 - ## 6 2 { 'command': 'human-monitor-command', 7 3 'data': {'command-line': 'str', '*cpu-index': 'int'}, 8 4 'returns': 'str' } 9 - ## 10 - # @TpmModel: 11 - ## 12 5 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] } 13 - ## 14 - # @query-tpm-models: 15 - ## 16 6 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] } 17 - ## 18 - # @guest-get-time: 19 - ## 20 7 { 'command': 'guest-get-time', 21 8 'returns': 'int' } 22 9 23 - ## 24 - # @no-way-this-will-get-whitelisted: 25 - ## 26 10 { 'command': 'no-way-this-will-get-whitelisted', 27 11 'returns': [ 'int' ] }
+1 -1
tests/qapi-schema/struct-base-clash-deep.err
··· 1 - tests/qapi-schema/struct-base-clash-deep.json:20: 'name' (member of Sub) collides with 'name' (member of Base) 1 + tests/qapi-schema/struct-base-clash-deep.json:10: 'name' (member of Sub) collides with 'name' (member of Base)
-10
tests/qapi-schema/struct-base-clash-deep.json
··· 2 2 # Here, 'name' would have to appear twice on the wire, locally and 3 3 # indirectly for the grandparent base; the collision doesn't care that 4 4 # one instance is optional. 5 - 6 - ## 7 - # @Base: 8 - ## 9 5 { 'struct': 'Base', 10 6 'data': { 'name': 'str' } } 11 - ## 12 - # @Mid: 13 - ## 14 7 { 'struct': 'Mid', 15 8 'base': 'Base', 16 9 'data': { 'value': 'int' } } 17 - ## 18 - # @Sub: 19 - ## 20 10 { 'struct': 'Sub', 21 11 'base': 'Mid', 22 12 'data': { '*name': 'str' } }
+1 -1
tests/qapi-schema/struct-base-clash.err
··· 1 - tests/qapi-schema/struct-base-clash.json:12: 'name' (member of Sub) collides with 'name' (member of Base) 1 + tests/qapi-schema/struct-base-clash.json:5: 'name' (member of Sub) collides with 'name' (member of Base)
-7
tests/qapi-schema/struct-base-clash.json
··· 1 1 # Reject attempts to duplicate QMP members 2 2 # Here, 'name' would have to appear twice on the wire, locally and for base. 3 - 4 - ## 5 - # @Base: 6 - ## 7 3 { 'struct': 'Base', 8 4 'data': { 'name': 'str' } } 9 - ## 10 - # @Sub: 11 - ## 12 5 { 'struct': 'Sub', 13 6 'base': 'Base', 14 7 'data': { 'name': 'str' } }
+1 -1
tests/qapi-schema/struct-data-invalid.err
··· 1 - tests/qapi-schema/struct-data-invalid.json:4: 'data' for struct 'foo' should be a dictionary or type name 1 + tests/qapi-schema/struct-data-invalid.json:1: 'data' for struct 'foo' should be a dictionary or type name
-3
tests/qapi-schema/struct-data-invalid.json
··· 1 - ## 2 - # @foo: 3 - ## 4 1 { 'struct': 'foo', 5 2 'data': false }
+1 -1
tests/qapi-schema/struct-member-invalid.err
··· 1 - tests/qapi-schema/struct-member-invalid.json:4: Member 'a' of 'data' for struct 'foo' should be a type name 1 + tests/qapi-schema/struct-member-invalid.json:1: Member 'a' of 'data' for struct 'foo' should be a type name
-3
tests/qapi-schema/struct-member-invalid.json
··· 1 - ## 2 - # @foo: 3 - ## 4 1 { 'struct': 'foo', 5 2 'data': { 'a': false } }
-14
tests/qapi-schema/test-qapi.py
··· 55 55 56 56 schema = QAPISchema(sys.argv[1]) 57 57 schema.visit(QAPISchemaTestVisitor()) 58 - 59 - for doc in schema.docs: 60 - if doc.symbol: 61 - print 'doc symbol=%s expr=%s' % \ 62 - (doc.symbol, doc.expr.items()[0]) 63 - else: 64 - print 'doc freeform' 65 - for arg, section in doc.args.iteritems(): 66 - print ' arg=%s\n%s' % (arg, section) 67 - for section in doc.sections: 68 - print ' section=%s\n%s' % (section.name, section) 69 - body = str(doc.body) 70 - if body: 71 - print ' body=\n%s' % body
+1 -1
tests/qapi-schema/type-bypass-bad-gen.err
··· 1 - tests/qapi-schema/type-bypass-bad-gen.json:6: 'gen' of command 'foo' should only use false value 1 + tests/qapi-schema/type-bypass-bad-gen.json:2: 'gen' of command 'foo' should only use false value
-4
tests/qapi-schema/type-bypass-bad-gen.json
··· 1 1 # 'gen' should only appear with value false 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 { 'command': 'foo', 'gen': 'whatever' }
+1 -1
tests/qapi-schema/unicode-str.err
··· 1 - tests/qapi-schema/unicode-str.json:6: 'command' uses invalid name 'é' 1 + tests/qapi-schema/unicode-str.json:2: 'command' uses invalid name 'é'
-4
tests/qapi-schema/unicode-str.json
··· 1 1 # we don't support full Unicode strings, yet 2 - 3 - ## 4 - # @e: 5 - ## 6 2 { 'command': 'é' }
+1 -1
tests/qapi-schema/union-base-no-discriminator.err
··· 1 - tests/qapi-schema/union-base-no-discriminator.json:23: Simple union 'TestUnion' must not have a base 1 + tests/qapi-schema/union-base-no-discriminator.json:11: Simple union 'TestUnion' must not have a base
-12
tests/qapi-schema/union-base-no-discriminator.json
··· 1 - ## 2 - # @TestTypeA: 3 - ## 4 1 # we reject simple unions with a base (or flat unions without discriminator) 5 2 { 'struct': 'TestTypeA', 6 3 'data': { 'string': 'str' } } 7 4 8 - ## 9 - # @TestTypeB: 10 - ## 11 5 { 'struct': 'TestTypeB', 12 6 'data': { 'integer': 'int' } } 13 7 14 - ## 15 - # @Base: 16 - ## 17 8 { 'struct': 'Base', 18 9 'data': { 'string': 'str' } } 19 10 20 - ## 21 - # @TestUnion: 22 - ## 23 11 { 'union': 'TestUnion', 24 12 'base': 'Base', 25 13 'data': { 'value1': 'TestTypeA',
+1 -1
tests/qapi-schema/union-branch-case.err
··· 1 - tests/qapi-schema/union-branch-case.json:6: 'Branch' (branch of NoWayThisWillGetWhitelisted) should not use uppercase 1 + tests/qapi-schema/union-branch-case.json:2: 'Branch' (branch of NoWayThisWillGetWhitelisted) should not use uppercase
-4
tests/qapi-schema/union-branch-case.json
··· 1 1 # Branch names should be 'lower-case' unless the union is whitelisted 2 - 3 - ## 4 - # @NoWayThisWillGetWhitelisted: 5 - ## 6 2 { 'union': 'NoWayThisWillGetWhitelisted', 'data': { 'Branch': 'int' } }
+1 -1
tests/qapi-schema/union-clash-branches.err
··· 1 - tests/qapi-schema/union-clash-branches.json:8: 'a_b' (branch of TestUnion) collides with 'a-b' (branch of TestUnion) 1 + tests/qapi-schema/union-clash-branches.json:4: 'a_b' (branch of TestUnion) collides with 'a-b' (branch of TestUnion)
-4
tests/qapi-schema/union-clash-branches.json
··· 1 1 # Union branch name collision 2 2 # Reject a union that would result in a collision in generated C names (this 3 3 # would try to generate two members 'a_b'). 4 - 5 - ## 6 - # @TestUnion: 7 - ## 8 4 { 'union': 'TestUnion', 9 5 'data': { 'a-b': 'int', 'a_b': 'str' } }
+1 -1
tests/qapi-schema/union-empty.err
··· 1 - tests/qapi-schema/union-empty.json:6: Union 'Union' cannot have empty 'data' 1 + tests/qapi-schema/union-empty.json:2: Union 'Union' cannot have empty 'data'
-4
tests/qapi-schema/union-empty.json
··· 1 1 # unions cannot be empty 2 - 3 - ## 4 - # @Union: 5 - ## 6 2 { 'union': 'Union', 'data': { } }
+1 -1
tests/qapi-schema/union-invalid-base.err
··· 1 - tests/qapi-schema/union-invalid-base.json:18: 'base' for union 'TestUnion' cannot use built-in type 'int' 1 + tests/qapi-schema/union-invalid-base.json:8: 'base' for union 'TestUnion' cannot use built-in type 'int'
-10
tests/qapi-schema/union-invalid-base.json
··· 1 1 # a union base type must be a struct 2 - 3 - ## 4 - # @TestTypeA: 5 - ## 6 2 { 'struct': 'TestTypeA', 7 3 'data': { 'string': 'str' } } 8 4 9 - ## 10 - # @TestTypeB: 11 - ## 12 5 { 'struct': 'TestTypeB', 13 6 'data': { 'integer': 'int' } } 14 7 15 - ## 16 - # @TestUnion: 17 - ## 18 8 { 'union': 'TestUnion', 19 9 'base': 'int', 20 10 'discriminator': 'int',
+1 -1
tests/qapi-schema/union-optional-branch.err
··· 1 - tests/qapi-schema/union-optional-branch.json:6: Member of union 'Union' does not allow optional name '*a' 1 + tests/qapi-schema/union-optional-branch.json:2: Member of union 'Union' does not allow optional name '*a'
-4
tests/qapi-schema/union-optional-branch.json
··· 1 1 # union branches cannot be optional 2 - 3 - ## 4 - # @Union: 5 - ## 6 2 { 'union': 'Union', 'data': { '*a': 'int', 'b': 'str' } }
+1 -1
tests/qapi-schema/union-unknown.err
··· 1 - tests/qapi-schema/union-unknown.json:6: Member 'unknown' of union 'Union' uses unknown type 'MissingType' 1 + tests/qapi-schema/union-unknown.json:2: Member 'unknown' of union 'Union' uses unknown type 'MissingType'
-4
tests/qapi-schema/union-unknown.json
··· 1 1 # we reject a union with unknown type in branch 2 - 3 - ## 4 - # @Union: 5 - ## 6 2 { 'union': 'Union', 7 3 'data': { 'unknown': 'MissingType' } }
+1 -1
tests/qapi-schema/unknown-escape.err
··· 1 - tests/qapi-schema/unknown-escape.json:7:21: Unknown escape \x 1 + tests/qapi-schema/unknown-escape.json:3:21: Unknown escape \x
-4
tests/qapi-schema/unknown-escape.json
··· 1 1 # we only recognize JSON escape sequences, plus our \' extension (no \x) 2 - 3 - ## 4 - # @foo: 5 - ## 6 2 # { 'command': 'foo', 'data': {} } 7 3 { 'command': 'foo', 'dat\x61':{} }
+1 -1
tests/qapi-schema/unknown-expr-key.err
··· 1 - tests/qapi-schema/unknown-expr-key.json:6: Unknown key 'bogus' in struct 'bar' 1 + tests/qapi-schema/unknown-expr-key.json:2: Unknown key 'bogus' in struct 'bar'
-4
tests/qapi-schema/unknown-expr-key.json
··· 1 1 # we reject an expression with unknown top-level keys 2 - 3 - ## 4 - # @bar: 5 - ## 6 2 { 'struct': 'bar', 'data': { 'string': 'str'}, 'bogus': { } }