We have discussed recently about two relatively cheap ways to catch
migration compatibility breakages across QEMU versions. This series
adds support for both.
1) vmstate-static-checker.py
This script has existed for a while and takes a dmup of vmstates from
two different QEMU versions and compares them.
The migration maintainer will run this before merges, but it's useless
for bugs that don't enter via the migration tree. I'm adding this test
to the CI for everyone.
Cons: the script can't handle renames and other compatible changes
that might happen to the vmstate structures without modification, so
these kinds of changes would fail the CI job during that release until
the script is fixed or the old QEMU version catches up. I think this
is passable because the CI job is already marked as allow_failure.
2) migration-tests with -device
We never ran the migration-tests with devices added to the QEMU
command line because the migration-tests run custom guest
code. However, just having the device in the command line already
causes it's state to be sent around and this has been shown to catch
bugs[1].
I'm adding support for running any migration-test with a list of
devices, either a hardcoded one provided by us, or a custom one
provided by whoever is experimenting with this code. This also give us
the ability to quickly check what happens when a new (to the tests)
device is added.
1- https://lore.kernel.org/r/87wmo5l58z.fsf@suse.de
Fabiano Rosas (4):
tests/qtest/libqtest: Introduce another qtest_init version with no
handshake
tests/qtest/migration: Add a test that runs vmstate-static-checker
tests/qtest/migration: Add support for simple device tests
ci: Add the new migration device tests
.gitlab-ci.d/buildtest.yml | 43 ++++++++++++---
tests/qtest/libqtest.c | 14 +++--
tests/qtest/libqtest.h | 13 +++++
tests/qtest/migration-test.c | 101 ++++++++++++++++++++++++++++++++++-
4 files changed, 157 insertions(+), 14 deletions(-)
base-commit: 01782d6b294f95bcde334386f0aaac593cd28c0d
--
2.35.3