qemu/tests/qtest/migration
Fabiano Rosas 538e03d280 tests/qtest/migration: Add a cancel test
The qmp_migrate_cancel() command is poorly tested and code inspection
reveals that there might be concurrency issues with its usage. Add a
test that runs a migration and calls qmp_migrate_cancel() at specific
moments.

In order to make the test more deterministic, instead of calling
qmp_migrate_cancel() at random moments during migration, do it after
the migration status change events are seen.

The expected result is that qmp_migrate_cancel() on the source ends
migration on the source with the "cancelled" state and ends migration
on the destination with the "failed" state. The only exception is that
a failed migration should continue in the failed state.

Cancelling is not allowed during postcopy (no test is added for this
because it's a trivial check in the code).

Reviewed-by: Peter Xu <peterx@redhat.com>
Message-ID: <20250213175927.19642-9-farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2025-02-14 15:19:06 -03:00
..
aarch64 tests/migration: Disambiguate guestperf vs. a-b 2024-12-12 10:25:39 -03:00
i386 tests/migration: Disambiguate guestperf vs. a-b 2024-12-12 10:25:39 -03:00
ppc64 tests/migration: Disambiguate guestperf vs. a-b 2024-12-12 10:25:39 -03:00
s390x tests/migration: Disambiguate guestperf vs. a-b 2024-12-12 10:25:39 -03:00
bootfile.c tests/qtest/migration: Move common test code 2024-12-12 10:25:40 -03:00
bootfile.h tests/qtest/migration: Move common test code 2024-12-12 10:25:40 -03:00
compression-tests.c tests/qtest/migration: Pick smoke tests 2025-02-10 13:47:58 +00:00
cpr-tests.c tests/qtest/migration: Pick smoke tests 2025-02-10 13:47:58 +00:00
file-tests.c testing and gdbstub updates: 2025-02-10 13:26:17 -05:00
framework.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
framework.h tests/qtest/migration: Add --full option 2025-02-10 13:47:58 +00:00
Makefile tests/migration: Disambiguate guestperf vs. a-b 2024-12-12 10:25:39 -03:00
migration-qmp.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
migration-qmp.h tests/qtest: enhance migration channels 2025-01-29 11:56:39 -03:00
migration-util.c tests/qtest/migration: Introduce migration_test_add_suffix 2025-02-14 15:19:06 -03:00
migration-util.h tests/qtest/migration: Introduce migration_test_add_suffix 2025-02-14 15:19:06 -03:00
misc-tests.c testing and gdbstub updates: 2025-02-10 13:26:17 -05:00
postcopy-tests.c testing and gdbstub updates: 2025-02-10 13:26:17 -05:00
precopy-tests.c tests/qtest/migration: Add a cancel test 2025-02-14 15:19:06 -03:00
tls-tests.c tests/qtest/migration: Pick smoke tests 2025-02-10 13:47:58 +00:00