[PATCH 0/4] migration: savevm testing

Fabiano Rosas posted 4 patches 4 days, 17 hours ago
migration/options.c                   |  26 +++++
migration/options.h                   |   1 +
migration/savevm.c                    |   8 ++
tests/qtest/meson.build               |   1 +
tests/qtest/migration-test.c          |   1 +
tests/qtest/migration/framework.c     |  54 ++++++----
tests/qtest/migration/framework.h     |   5 +
tests/qtest/migration/migration-qmp.c | 120 +++++++++++++++++++++
tests/qtest/migration/migration-qmp.h |   4 +
tests/qtest/migration/savevm-tests.c  | 144 ++++++++++++++++++++++++++
10 files changed, 345 insertions(+), 19 deletions(-)
create mode 100644 tests/qtest/migration/savevm-tests.c
[PATCH 0/4] migration: savevm testing
Posted by Fabiano Rosas 4 days, 17 hours ago
Hi, we had a bug report that enabling multifd and attempting
savevm/loadvm crashes QEMU. This seems to have been around for many
years.

I'm adding a fix for this in the form of a capabilities check for
snapshots.

I'm also adding a couple of tests that validate migration capabilities
are properly rejected by savevm.

There is a larger discussion to be had which is whether we want to
attempt to implement every migration capability for snapshots or
should we try to convert snapshots into a regular migration or some
third option. For now I'm trying to avoid this by not touching
capabilities that don't cause a crash, but let me know your thoughts.

Thanks

CI run: https://gitlab.com/farosas/qemu/-/pipelines/1738368896

Fabiano Rosas (4):
  migration/savevm: Add a compatibility check for capabilities
  tests/qtest/migration: Extract machine type resolution
  tests/qtest/migration: Add QMP helpers for snapshot
  tests/qtest/migration: Add savevm tests

 migration/options.c                   |  26 +++++
 migration/options.h                   |   1 +
 migration/savevm.c                    |   8 ++
 tests/qtest/meson.build               |   1 +
 tests/qtest/migration-test.c          |   1 +
 tests/qtest/migration/framework.c     |  54 ++++++----
 tests/qtest/migration/framework.h     |   5 +
 tests/qtest/migration/migration-qmp.c | 120 +++++++++++++++++++++
 tests/qtest/migration/migration-qmp.h |   4 +
 tests/qtest/migration/savevm-tests.c  | 144 ++++++++++++++++++++++++++
 10 files changed, 345 insertions(+), 19 deletions(-)
 create mode 100644 tests/qtest/migration/savevm-tests.c

-- 
2.35.3
Re: [PATCH 0/4] migration: savevm testing
Posted by Fabiano Rosas 4 days, 17 hours ago
Fabiano Rosas <farosas@suse.de> writes:

> Hi, we had a bug report that enabling multifd and attempting
> savevm/loadvm crashes QEMU. This seems to have been around for many
> years.
>
> I'm adding a fix for this in the form of a capabilities check for
> snapshots.
>
> I'm also adding a couple of tests that validate migration capabilities
> are properly rejected by savevm.
>
> There is a larger discussion to be had which is whether we want to
> attempt to implement every migration capability for snapshots or
> should we try to convert snapshots into a regular migration or some
> third option. For now I'm trying to avoid this by not touching
> capabilities that don't cause a crash, but let me know your thoughts.

Turns out, there's a patch that just arrived on the mailing list adding
mapped-ram support for savevm/loadvm, so I guess we'll have this
discussion now =)

migration: add FEATURE_SEEKABLE to QIOChannelBlock
https://lore.kernel.org/r/20250327141451.163744-3-Marco.Cavenati@eurecom.fr

>
> Thanks
>
> CI run: https://gitlab.com/farosas/qemu/-/pipelines/1738368896
>
> Fabiano Rosas (4):
>   migration/savevm: Add a compatibility check for capabilities
>   tests/qtest/migration: Extract machine type resolution
>   tests/qtest/migration: Add QMP helpers for snapshot
>   tests/qtest/migration: Add savevm tests
>
>  migration/options.c                   |  26 +++++
>  migration/options.h                   |   1 +
>  migration/savevm.c                    |   8 ++
>  tests/qtest/meson.build               |   1 +
>  tests/qtest/migration-test.c          |   1 +
>  tests/qtest/migration/framework.c     |  54 ++++++----
>  tests/qtest/migration/framework.h     |   5 +
>  tests/qtest/migration/migration-qmp.c | 120 +++++++++++++++++++++
>  tests/qtest/migration/migration-qmp.h |   4 +
>  tests/qtest/migration/savevm-tests.c  | 144 ++++++++++++++++++++++++++
>  10 files changed, 345 insertions(+), 19 deletions(-)
>  create mode 100644 tests/qtest/migration/savevm-tests.c