From dec0012ef8d644b5dde1b68ee8dab3f8c12e0b6b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 14 Sep 2019 17:34:59 +0200 Subject: 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 Message-Id: <20190914153506.2151-13-armbru@redhat.com> Reviewed-by: Eric Blake --- tests/qapi-schema/struct-member-if-invalid.json | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/qapi-schema/struct-member-if-invalid.json') diff --git a/tests/qapi-schema/struct-member-if-invalid.json b/tests/qapi-schema/struct-member-if-invalid.json index 73987e04fc..35078bd660 100644 --- a/tests/qapi-schema/struct-member-if-invalid.json +++ b/tests/qapi-schema/struct-member-if-invalid.json @@ -1,4 +1,3 @@ # Cover member with invalid 'if' -# FIXME not rejected, would generate '#if True\n' { 'struct': 'Stru', 'data': { 'member': { 'type': 'int', 'if': true } } } -- cgit v1.2.3-55-g7522