aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2024-09-03 13:47:26 +0200
committerFabiano Rosas <farosas@suse.de>2024-09-03 16:24:37 -0300
commitd41c9896f49076d1eaaa32214bd2296bd36d866c (patch)
treeb4f6d1ff863ddddcccde8399703e1a980388b11a
parent203beb6f047467a4abfc8267c234393cea3f471c (diff)
downloadqemu-d41c9896f49076d1eaaa32214bd2296bd36d866c.zip
qemu-d41c9896f49076d1eaaa32214bd2296bd36d866c.tar.gz
qemu-d41c9896f49076d1eaaa32214bd2296bd36d866c.tar.bz2
tests/qtest/migration: Add a check for the availability of the "pc" machine
The test_vcpu_dirty_limit is the only test that does not check for the availability of the machine before starting the test, so it fails when QEMU has been configured with --without-default-devices. Add a check for the "pc" machine type to fix it. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
-rw-r--r--tests/qtest/migration-test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 6aca676..9d08101 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -3952,8 +3952,10 @@ int main(int argc, char **argv)
if (g_str_equal(arch, "x86_64") && has_kvm && kvm_dirty_ring_supported()) {
migration_test_add("/migration/dirty_ring",
test_precopy_unix_dirty_ring);
- migration_test_add("/migration/vcpu_dirty_limit",
- test_vcpu_dirty_limit);
+ if (qtest_has_machine("pc")) {
+ migration_test_add("/migration/vcpu_dirty_limit",
+ test_vcpu_dirty_limit);
+ }
}
ret = g_test_run();