From 315932b5edb86597adafbd1faa2d29c46499d8c3 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 1 Jul 2015 10:12:24 +0200 Subject: qapi: Fix to reject union command and event arguments A command's or event's 'data' must be a struct type, given either as a dictionary, or as struct type name. Commit dd883c6 tightened the checking there, but not enough: we still accept 'union'. Fix to reject it. We may want to support union types there, but we'll have to extend qapi-commands.py and qapi-events.py for it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/qapi-schema/args-union.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/qapi-schema/args-union.json') diff --git a/tests/qapi-schema/args-union.json b/tests/qapi-schema/args-union.json index db97ef643b..7bdcbb7f08 100644 --- a/tests/qapi-schema/args-union.json +++ b/tests/qapi-schema/args-union.json @@ -1,4 +1,4 @@ -# FIXME we should reject union arguments +# we do not allow union arguments # TODO should we support this? { 'union': 'Uni', 'data': { 'case1': 'int', 'case2': 'str' } } { 'command': 'oops', 'data': 'Uni' } -- cgit v1.2.3