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

Peter Krempa posted 7 patches 2 years, 7 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1632145487.git.pkrempa@redhat.com
There is a newer version of this series
src/qemu/qemu_qapi.c        |  46 +++++++++++--
tests/testutilsqemuschema.c | 130 +++++++++++++++++++++---------------
2 files changed, 117 insertions(+), 59 deletions(-)
[RFC PATCH 0/7] qemu: QAPI-schema: Add support for enum value 'features'
Posted by Peter Krempa 2 years, 7 months ago
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(-)

-- 
2.31.1

Re: [RFC PATCH 0/7] qemu: QAPI-schema: Add support for enum value 'features'
Posted by Michal Prívozník 2 years, 7 months ago
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@redhat.com>

Michal