[PATCH 0/3] qtest: migration: Add validation tests for 'channels' argument in migrate QAPIs

Het Gala posted 3 patches 8 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240216090624.75445-1-het.gala@nutanix.com
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>
tests/qtest/dbus-vmstate-test.c |   2 +-
tests/qtest/migration-helpers.c |  93 ++++++++++++++++++++++--
tests/qtest/migration-helpers.h |  11 +--
tests/qtest/migration-test.c    | 123 +++++++++++++++++++++++++++-----
4 files changed, 202 insertions(+), 27 deletions(-)
[PATCH 0/3] qtest: migration: Add validation tests for 'channels' argument in migrate QAPIs
Posted by Het Gala 8 months, 2 weeks ago
With recent migrate QAPI changes enabling direct use of the 'channels'
argument, avoiding redundant string parsing of the URI is achieved.

To ensure backward compatibility, both 'uri' and 'channels' arguments are
now optional in migration QMP commands. However, they are mutually exclusive,
requiring at least one for a successful migration connection.

Hence, validating 'uri' and 'channels' becomes crucial to prevent their
simultaneous presence in migrate QAPIs.

Patch Summary:
1. Introduce migrate_qmp() and migrate_qmp_fail() with 'channels' arguments
   and a conversion function from MigrationChannelList to QList.
2. Add a new field in the MigrateCommon struct to support the 'channels'
   argument during migration.
3. Include negative validation tests to disallow both arguments in migration
   QAPIs.

Het Gala (3):
  qtest: migration: Enhance qtest migration functions to support
    'channels' argument
  qtest: migration: Introduce 'connect_channels' in MigrateCommon struct
  qtest: migration: Add negative validation test for 'uri' and
    'channels' both set

 tests/qtest/dbus-vmstate-test.c |   2 +-
 tests/qtest/migration-helpers.c |  93 ++++++++++++++++++++++--
 tests/qtest/migration-helpers.h |  11 +--
 tests/qtest/migration-test.c    | 123 +++++++++++++++++++++++++++-----
 4 files changed, 202 insertions(+), 27 deletions(-)

-- 
2.22.3