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

tests/qapi-schema: Cover empty union base

The new test case shows off qapi.py choking on an empty union base.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1489582656-31133-9-git-send-email-armbru@redhat.com>

+21
+1
tests/Makefile.include
··· 476 476 qapi-schema += unclosed-object.json 477 477 qapi-schema += unclosed-string.json 478 478 qapi-schema += unicode-str.json 479 + qapi-schema += union-base-empty.json 479 480 qapi-schema += union-base-no-discriminator.json 480 481 qapi-schema += union-branch-case.json 481 482 qapi-schema += union-clash-branches.json
+10
tests/qapi-schema/union-base-empty.err
··· 1 + Traceback (most recent call last): 2 + File "tests/qapi-schema/test-qapi.py", line 56, in <module> 3 + schema = QAPISchema(sys.argv[1]) 4 + File "scripts/qapi.py", line 1487, in __init__ 5 + self.exprs = check_exprs(parser.exprs) 6 + File "scripts/qapi.py", line 921, in check_exprs 7 + check_union(expr, info) 8 + File "scripts/qapi.py", line 738, in check_union 9 + assert base_members 10 + AssertionError
+1
tests/qapi-schema/union-base-empty.exit
··· 1 + 1
+9
tests/qapi-schema/union-base-empty.json
··· 1 + # Flat union with empty base and therefore without discriminator 2 + 3 + { 'struct': 'Empty', 'data': { } } 4 + 5 + { 'union': 'TestUnion', 6 + 'base': 'Empty', 7 + 'discriminator': 'type', 8 + 'data': { 'value1': 'int', 9 + 'value2': 'str' } }
tests/qapi-schema/union-base-empty.out

This is a binary file and will not be displayed.