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

tests/qapi-schema: Error case tests for features in structs

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20190606153803.5278-4-armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>

authored by

Kevin Wolf and committed by
Markus Armbruster
a00af404 8aa3a33e

+37
+6
tests/Makefile.include
··· 378 378 qapi-schema += event-case.json 379 379 qapi-schema += event-member-invalid-dict.json 380 380 qapi-schema += event-nest-struct.json 381 + qapi-schema += features-bad-type.json 382 + qapi-schema += features-duplicate-name.json 383 + qapi-schema += features-missing-name.json 384 + qapi-schema += features-name-bad-type.json 385 + qapi-schema += features-no-list.json 386 + qapi-schema += features-unknown-key.json 381 387 qapi-schema += flat-union-array-branch.json 382 388 qapi-schema += flat-union-bad-base.json 383 389 qapi-schema += flat-union-bad-discriminator.json
+1
tests/qapi-schema/features-bad-type.err
··· 1 + tests/qapi-schema/features-bad-type.json:1: Feature of struct FeatureStruct0 requires a string name
+1
tests/qapi-schema/features-bad-type.exit
··· 1 + 1
+3
tests/qapi-schema/features-bad-type.json
··· 1 + { 'struct': 'FeatureStruct0', 2 + 'data': { 'foo': 'int' }, 3 + 'features': [ [ 'a feature cannot be an array' ] ] }
tests/qapi-schema/features-bad-type.out

This is a binary file and will not be displayed.

+1
tests/qapi-schema/features-duplicate-name.err
··· 1 + tests/qapi-schema/features-duplicate-name.json:1: 'foo' (feature of FeatureStruct0) collides with 'foo' (feature of FeatureStruct0)
+1
tests/qapi-schema/features-duplicate-name.exit
··· 1 + 1
+3
tests/qapi-schema/features-duplicate-name.json
··· 1 + { 'struct': 'FeatureStruct0', 2 + 'data': { 'foo': 'int' }, 3 + 'features': [ 'foo', 'bar', 'foo' ] }
tests/qapi-schema/features-duplicate-name.out

This is a binary file and will not be displayed.

+1
tests/qapi-schema/features-missing-name.err
··· 1 + tests/qapi-schema/features-missing-name.json:1: Key 'name' is missing from feature of struct FeatureStruct0
+1
tests/qapi-schema/features-missing-name.exit
··· 1 + 1
+3
tests/qapi-schema/features-missing-name.json
··· 1 + { 'struct': 'FeatureStruct0', 2 + 'data': { 'foo': 'int' }, 3 + 'features': [ { 'if': 'defined(NAMELESS_FEATURES)' } ] }
tests/qapi-schema/features-missing-name.out

This is a binary file and will not be displayed.

+1
tests/qapi-schema/features-name-bad-type.err
··· 1 + tests/qapi-schema/features-name-bad-type.json:1: Feature of struct FeatureStruct0 requires a string name
+1
tests/qapi-schema/features-name-bad-type.exit
··· 1 + 1
+3
tests/qapi-schema/features-name-bad-type.json
··· 1 + { 'struct': 'FeatureStruct0', 2 + 'data': { 'foo': 'int' }, 3 + 'features': [ { 'name': { 'feature-type': 'object' } } ] }
tests/qapi-schema/features-name-bad-type.out

This is a binary file and will not be displayed.

+1
tests/qapi-schema/features-no-list.err
··· 1 + tests/qapi-schema/features-no-list.json:1: Struct 'FeatureStruct0' requires an array for 'features'
+1
tests/qapi-schema/features-no-list.exit
··· 1 + 1
+3
tests/qapi-schema/features-no-list.json
··· 1 + { 'struct': 'FeatureStruct0', 2 + 'data': { 'foo': 'int' }, 3 + 'features': 'bar' }
tests/qapi-schema/features-no-list.out

This is a binary file and will not be displayed.

+2
tests/qapi-schema/features-unknown-key.err
··· 1 + tests/qapi-schema/features-unknown-key.json:1: Unknown key 'colour' in feature of struct FeatureStruct0 2 + Valid keys are 'if', 'name'.
+1
tests/qapi-schema/features-unknown-key.exit
··· 1 + 1
+3
tests/qapi-schema/features-unknown-key.json
··· 1 + { 'struct': 'FeatureStruct0', 2 + 'data': { 'foo': 'int' }, 3 + 'features': [ { 'name': 'bar', 'colour': 'red' } ] }
tests/qapi-schema/features-unknown-key.out

This is a binary file and will not be displayed.