tests/qtest/migration: Support more than one QEMU binary
commit5050ad2a380832a62c7dedda147bbee06c8fe924
authorFabiano Rosas <farosas@suse.de>
Wed, 18 Oct 2023 19:27:39 +0000 (18 16:27 -0300)
committerJuan Quintela <quintela@redhat.com>
Fri, 20 Oct 2023 06:51:41 +0000 (20 08:51 +0200)
treeeb5c0cc47e7642b73a8a8712d307396b35a43514
parentfa35b0cb25775abb95f61e219b14b63084fb7c5a
tests/qtest/migration: Support more than one QEMU binary

We have strict rules around migration compatibility between different
QEMU versions but no test to validate the migration state between
different binaries.

Add infrastructure to allow running the migration tests with two
different QEMU binaries as migration source and destination.

The code now recognizes two new environment variables
QTEST_QEMU_BINARY_SRC and QTEST_QEMU_BINARY_DST. In the absence of
either of them, the test will use the QTEST_QEMU_BINARY variable. If
both are missing then the tests are run with single binary as
previously.

The machine type is selected automatically as the latest machine type
version that works with both binaries.

Usage (only one of SRC|DST is allowed):

QTEST_QEMU_BINARY_SRC=../build-8.2.0/qemu-system-x86_64 \
QTEST_QEMU_BINARY=../build-8.1.0/qemu-system-x86_64 \
./tests/qtest/migration-test

Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231018192741.25885-11-farosas@suse.de>
tests/qtest/migration-test.c