[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 11/14] tests/qapi-schema: Clean up positive test for conditio
From: |
Eric Blake |
Subject: |
Re: [PATCH 11/14] tests/qapi-schema: Clean up positive test for conditionals |
Date: |
Thu, 16 Mar 2023 20:09:50 -0500 |
User-agent: |
NeoMutt/20220429 |
On Thu, Mar 16, 2023 at 08:13:22AM +0100, Markus Armbruster wrote:
> Union TestIfUnion is conditional on macros TEST_IF_UNION and
> TEST_IF_STRUCT. It uses TestIfEnum, which is conditional on macro
> TEST_IF_ENUM. If TEST_IF_ENUM and TEST_IF_STRUCT are defined, but
> TEST_IF_ENUM isn't, the generated code won't compile.
s/ENUM/UNION/ in one of these two uses in this sentence.
>
> Command test-if-cmd is conditional an macros TEST_IF_CMD and
> TEST_IF_STRUCT, and uses TestIfEnum. Similar issue.
>
> Event TEST_IF_EVENT is conditional an macros TEST_IF_EVT and
> TEST_IF_STRUCT, and uses TestIfEnum. Similar issue.
>
> Replace the uses of TestIfEnum in the latter two by str.
>
> TestIfUnion is now TestIfEnum's only user. Change TestIfEnum's
> condition to TEST_IF_UNION.
Fair enough, once the commit message doesn't confuse me in the first
paragraph ;)
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> tests/qapi-schema/qapi-schema-test.json | 6 +++---
> tests/qapi-schema/qapi-schema-test.out | 8 +++-----
> 2 files changed, 6 insertions(+), 8 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[PATCH 05/14] qapi: Improve error message for unexpected array types, Markus Armbruster, 2023/03/16
[PATCH 02/14] qapi/schema: Use super(), Markus Armbruster, 2023/03/16
[PATCH 01/14] qapi: Fix error message format regression, Markus Armbruster, 2023/03/16
[PATCH 08/14] qapi: Fix to reject 'data': 'mumble' in struct, Markus Armbruster, 2023/03/16