Currently our aarch64 tests are only being run using identical QEMU versions. When running the tests with different QEMU versions, which is a common use-case for migration, the tests are broken due to the current choice of the 'max' cpu, which is not stable and is prone to breaking migration.
This means aarch64 tests are currently only testing about the same situations as any other arch, i.e. no arm-specific testing is being done. To make the aarch64 tests more useful, -cpu max will be changed to -cpu neoverse-n1 in the next patch. Before doing that, make sure aarch64 tests only run with TCG, since KVM testing depends on usage of the -cpu host and we currently don't have code to switch between cpus according to test runtime environment. Also, TCG alone should allow us to catch most issues with migration, since there is no guarantee of a uniform environment as there is with KVM. Suggested-by: Peter Maydell <peter.mayd...@linaro.org> Signed-off-by: Fabiano Rosas <faro...@suse.de> --- tests/qtest/migration/framework.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index 407c9023c0..f09365d122 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -353,8 +353,17 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri, memory_backend = g_strdup_printf("-m %s ", memory_size); } - if (args->use_dirty_ring) { - kvm_opts = ",dirty-ring-size=4096"; + + if (g_str_equal(arch, "aarch64")) { + /* + * aarch64 is only tested with TCG because there is no single + * cpu that can be used for both KVM and TCG. + */ + kvm_opts = NULL; + } else if (args->use_dirty_ring) { + kvm_opts = "-accel kvm,dirty-ring-size=4096"; + } else { + kvm_opts = "-accel kvm"; } if (!qtest_has_machine(machine_alias)) { @@ -368,7 +377,7 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri, g_test_message("Using machine type: %s", machine); - cmd_source = g_strdup_printf("-accel kvm%s -accel tcg " + cmd_source = g_strdup_printf("%s -accel tcg " "-machine %s,%s " "-name source,debug-threads=on " "%s " @@ -395,7 +404,7 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri, */ events = args->defer_target_connect ? "-global migration.x-events=on" : ""; - cmd_target = g_strdup_printf("-accel kvm%s -accel tcg " + cmd_target = g_strdup_printf("%s -accel tcg " "-machine %s,%s " "-name target,debug-threads=on " "%s " -- 2.35.3