mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
qapi: Fix missing 'if' checks in struct, union, alternate 'data'
Commit 87adbbffd4..3e270dcacc "qapi: Add 'if' to (implicit struct|union|alternate) members" (v4.0.0) neglected test coverage, and promptly failed to check the conditions. Review fail. Recent commit "tests/qapi-schema: Demonstrate insufficient 'if' checking" added test coverage, demonstrating the bug. Fix it by add the missing check_if(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-13-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
c2c7065e17
commit
dec0012ef8
13 changed files with 9 additions and 60 deletions
|
@ -1,23 +0,0 @@
|
|||
module None
|
||||
object q_empty
|
||||
enum QType
|
||||
prefix QTYPE
|
||||
member none
|
||||
member qnull
|
||||
member qnum
|
||||
member qstring
|
||||
member qdict
|
||||
member qlist
|
||||
member qbool
|
||||
module union-branch-if-invalid.json
|
||||
enum Branches
|
||||
member branch1
|
||||
object Stru
|
||||
member member: str optional=False
|
||||
object q_obj_Uni-base
|
||||
member tag: Branches optional=False
|
||||
object Uni
|
||||
base q_obj_Uni-base
|
||||
tag tag
|
||||
case branch1: Stru
|
||||
if ['']
|
Loading…
Add table
Add a link
Reference in a new issue