qapi: Fix missing 'if' checks in struct, union, alternate 'data'
commitdec0012ef8d644b5dde1b68ee8dab3f8c12e0b6b
authorMarkus Armbruster <armbru@redhat.com>
Sat, 14 Sep 2019 15:34:59 +0000 (14 17:34 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 24 Sep 2019 12:07:23 +0000 (24 14:07 +0200)
tree61c6ab6e7f0576311d94783c99045f117c73e14f
parentc2c7065e1752a3be1b437d1ea359cde35d28ee3b
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>
13 files changed:
scripts/qapi/common.py
tests/qapi-schema/alternate-branch-if-invalid.err
tests/qapi-schema/alternate-branch-if-invalid.exit
tests/qapi-schema/alternate-branch-if-invalid.json
tests/qapi-schema/alternate-branch-if-invalid.out
tests/qapi-schema/struct-member-if-invalid.err
tests/qapi-schema/struct-member-if-invalid.exit
tests/qapi-schema/struct-member-if-invalid.json
tests/qapi-schema/struct-member-if-invalid.out
tests/qapi-schema/union-branch-if-invalid.err
tests/qapi-schema/union-branch-if-invalid.exit
tests/qapi-schema/union-branch-if-invalid.json
tests/qapi-schema/union-branch-if-invalid.out [copied from tests/qapi-schema/alternate-branch-if-invalid.err with 100% similarity]