[RFC PATCH 0/7] qemu: QAPI-schema: Add support for enum value 'features'

Michal Prívozník mprivozn at redhat.com
Thu Sep 23 08:52:20 UTC 2021


On 9/20/21 3:49 PM, Peter Krempa wrote:
> This series is based on Markus' effort to add 'feature' flags to enum
> values so that e.g. they can be deprecated:
> 
> https://listman.redhat.com/archives/libvir-list/2021-September/msg00453.html
> 
> This series adapts both the schema query language to support querying
> for arbitrary feature flags and also the schema validator to reject
> deprecated enum values.
> 
> Libvirt didn't use any deprecated value for now so to see that this
> really works you can fetch this series including patches which show it's
> working (tests fail):
> 
>  git fetch https://gitlab.com/pipo.sk/libvirt.git qemu-deprecate-enum
> 
> The above branch also demonstrates that parsing from the new arrays
> produces identical results as it has updated qemu capabilities.
> 
> This series is RFC as it's waiting for the qemu additions first.
> 
> Peter Krempa (7):
>   virQEMUQAPISchemaTraverseEnum: Move helper variables into loop
>   virQEMUQAPISchemaTraverseEnum: Use the modern 'members' array
>   virQEMUQAPISchemaTraverseEnum: Allow query of enume type features
>   testQEMUSchemaValidateEnum: Refactor logic to simplify switching to
>     new QMP schema format
>   testQEMUSchemaValidateEnum: Use new 'members' for 'enum' meta type
>   testQEMUSchemaValidateDeprecated: Move to the top
>   testQEMUSchemaValidateEnum: Validate deprecated members
> 
>  src/qemu/qemu_qapi.c        |  46 +++++++++++--
>  tests/testutilsqemuschema.c | 130 +++++++++++++++++++++---------------
>  2 files changed, 117 insertions(+), 59 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>

Michal




More information about the libvir-list mailing list