[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/19] tests/qapi-schema: Demonstrate misleading
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 03/19] tests/qapi-schema: Demonstrate misleading optional tag error |
Date: |
Tue, 17 Sep 2019 12:36:17 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 9/14/19 10:34 AM, Markus Armbruster wrote:
> Test flat-union-optional-discriminator declares its union tag as
> '*switch': 'Enum', and points to it with 'discriminator': '*switch'.
> This gets rejected as "discriminator of flat union 'MyUnion' uses
> invalid name '*switch'". Correct; member 'discriminator' doesn't
> accept a '*' prefix.
>
> However, this merely tests name validity checking, which we already
> cover elsewhere. More interesting is testing the valid name 'switch'.
> This reports "discriminator 'switch' is not a member of base struct
> 'Base'", which is misleading.
>
> Copy the existing 'discriminator': '*switch' test to
> flat-union-discriminator-bad-name, and rewrite its comment. Change
> flat-union-optional-discriminator to test 'discriminator': 'switch',
> and mark it FIXME.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 00/19] qapi: Frontend fixes and cleanups, Markus Armbruster, 2019/09/14
- [Qemu-devel] [PATCH 01/19] tests/qapi-schema: Cover unknown pragma, Markus Armbruster, 2019/09/14
- [Qemu-devel] [PATCH 05/19] tests/qapi-schema: Demonstrate insufficient 'if' checking, Markus Armbruster, 2019/09/14
- [Qemu-devel] [PATCH 03/19] tests/qapi-schema: Demonstrate misleading optional tag error, Markus Armbruster, 2019/09/14
- Re: [Qemu-devel] [PATCH 03/19] tests/qapi-schema: Demonstrate misleading optional tag error,
Eric Blake <=
- [Qemu-devel] [PATCH 14/19] qapi: Simplify check_keys(), Markus Armbruster, 2019/09/14
- [Qemu-devel] [PATCH 12/19] qapi: Fix missing 'if' checks in struct, union, alternate 'data', Markus Armbruster, 2019/09/14
- [Qemu-devel] [PATCH 10/19] qapi: Fix broken discriminator error messages, Markus Armbruster, 2019/09/14
- [Qemu-devel] [PATCH 02/19] tests/qapi-schema: Delete two redundant tests, Markus Armbruster, 2019/09/14
- [Qemu-devel] [PATCH 08/19] qapi: Improve reporting of lexical errors, Markus Armbruster, 2019/09/14