[PATCH 00/15] tests: qemu: Detect deprecation in the QMP schema (deprecation part 1)

Peter Krempa posted 15 patches 3 years, 11 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1588185999.git.pkrempa@redhat.com
tests/qemublocktest.c        |  14 +-
tests/qemuhotplugtest.c      |  11 +-
tests/qemumonitorjsontest.c  |  67 +++++--
tests/qemumonitortestutils.c |  66 ++++---
tests/qemumonitortestutils.h |   2 +
tests/testutilsqemuschema.c  | 334 ++++++++++++++++++++++-------------
tests/testutilsqemuschema.h  |   9 +
7 files changed, 325 insertions(+), 178 deletions(-)
[PATCH 00/15] tests: qemu: Detect deprecation in the QMP schema (deprecation part 1)
Posted by Peter Krempa 3 years, 11 months ago
Recent qemu versions started adding the 'deprecated' feature to commands
and fields. Use this data to validate that our code doesn't rely on
deprecated commands. It turns out that we still use some old migration
commands (See 14/15) and add validator to catch anything deprecated
early.

Peter Krempa (15):
  testQemuHotplugCpuPrepare: Allow unused monitor commands only on
    failure
  testutilsqemuschema: Introduce testQEMUSchemaValidateCommand
  qemuMonitorTestProcessCommandDefaultValidate: Use
    testQEMUSchemaValidateCommand
  qemuMonitorTestProcessCommandDefaultValidate: Clean up return value
    use
  qemumonitortestutils: Introduce
    qemuMonitorTestSkipDeprecatedValidation
  testutilsqemuschema: Use automatic variable clearing where possible
  testutilsqemuschema: Pass in 'schema' and 'debug' variables to workers
    in a struct
  testQEMUSchemaValidate(Command): Allow skipping validation of
    deprecated fields
  testQemuHotplugCpuPrepare: Allow deprecated commands for non-modern
    cpu hotplug test
  qemumonitorjsontest: Add infrastructure for generated tests of
    deprecated commands
  testQemuMonitorJSONqemuMonitorJSONQueryCPUs: Split off test for
    query-cpus-fast
  qemumonitorjsontest: Allow use of deprecated 'query-cpus'
  qemumonitorjsontest: Allow use of deprecated 'cpu-add' and 'change'
    command
  qemumonitorjsontest: Mark recently deprecated migration command in our
    tests
  testQEMUSchemaValidate*: Reject usage of fields with 'deprecated' set

 tests/qemublocktest.c        |  14 +-
 tests/qemuhotplugtest.c      |  11 +-
 tests/qemumonitorjsontest.c  |  67 +++++--
 tests/qemumonitortestutils.c |  66 ++++---
 tests/qemumonitortestutils.h |   2 +
 tests/testutilsqemuschema.c  | 334 ++++++++++++++++++++++-------------
 tests/testutilsqemuschema.h  |   9 +
 7 files changed, 325 insertions(+), 178 deletions(-)

-- 
2.26.2