qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/5] qapi: Add feature flags to enum members


From: Markus Armbruster
Subject: Re: [PATCH v2 2/5] qapi: Add feature flags to enum members
Date: Thu, 21 Oct 2021 10:48:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Kevin Wolf <kwolf@redhat.com> writes:

> Am 09.10.2021 um 14:09 hat Markus Armbruster geschrieben:
>> This is quite similar to commit 84ab008687 "qapi: Add feature flags to
>> struct members", only for enums instead of structs.
>> 
>> Special feature flag 'deprecated' is silently ignored there.  This is
>> okay only because it will be implemented shortly.
>> 
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> Should we have a test case for an invalid value for 'features'?

We have coverage, just not in every context.

struct context:

    tests/qapi-schema/features-bad-type.json
    tests/qapi-schema/features-deprecated-type.json
    tests/qapi-schema/features-duplicate-name.json
    tests/qapi-schema/features-if-invalid.json
    tests/qapi-schema/features-missing-name.json
    tests/qapi-schema/features-name-bad-type.json
    tests/qapi-schema/features-no-list.json
    tests/qapi-schema/features-unknown-key.json

struct member context:

    tests/qapi-schema/features-member-bad-type.json
    tests/qapi-schema/features-member-duplicate-name.json
    tests/qapi-schema/features-member-if-invalid.json
    tests/qapi-schema/features-member-missing-name.json
    tests/qapi-schema/features-member-name-bad-type.json
    tests/qapi-schema/features-member-no-list.json
    tests/qapi-schema/features-member-unknown-key.json

These are basically the same, except for features-deprecated-type.json,
which makes sense only in struct context.

The other contexts are enum, union, alternate, command, event, and now
enum member.

My excuse for skipping contexts is that the errors come from
check_features() for all them.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]