]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/qtest/migration: Add a check for the availability of the "pc" machine
authorThomas Huth <thuth@redhat.com>
Tue, 3 Sep 2024 11:47:26 +0000 (13:47 +0200)
committerFabiano Rosas <farosas@suse.de>
Tue, 3 Sep 2024 19:24:37 +0000 (16:24 -0300)
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>
tests/qtest/migration-test.c

index 6aca6760ef07c2fa4226af0e0538d7609c0c7d97..9d08101643f6f5ffaa010a42dabcaa5b302e06d6 100644 (file)
@@ -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();