From 4918bb7defbdcb1e27cc2adf4e1604486d778ece Mon Sep 17 00:00:00 2001 From: John Snow Date: Wed, 21 Apr 2021 14:20:22 -0400 Subject: qapi/expr.py: Check type of union and alternate 'data' member Prior to this commit, specifying a non-object value here causes the QAPI parser to crash in expr.py with a stack trace with (likely) an AttributeError when we attempt to call that value's items() method. This member needs to be an object (Dict), and not anything else. Add a check for this with a nicer error message, and formalize that check with new test cases that exercise that error. Signed-off-by: John Snow Message-Id: <20210421182032.3521476-8-jsnow@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- tests/qapi-schema/union-invalid-data.out | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/qapi-schema/union-invalid-data.out (limited to 'tests/qapi-schema/union-invalid-data.out') diff --git a/tests/qapi-schema/union-invalid-data.out b/tests/qapi-schema/union-invalid-data.out new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3-55-g7522