From 030cd885563e9ca843a46ec7e65b657c93df5af7 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 30 Sep 2025 11:04:44 +0200 Subject: tests/qtest: Add missing checks for the availability of machines When QEMU has been compiled with "--without-default-devices", the machines might not be available in the binary. Let's properly check for the machines before running the tests to avoid that they are failing in this case. Signed-off-by: Thomas Huth Link: https://lore.kernel.org/qemu-devel/20250930090444.234431-1-thuth@redhat.com Signed-off-by: Fabiano Rosas --- tests/qtest/cpu-plug-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/qtest/cpu-plug-test.c') diff --git a/tests/qtest/cpu-plug-test.c b/tests/qtest/cpu-plug-test.c index 44d704680b..0aa4ccc5b6 100644 --- a/tests/qtest/cpu-plug-test.c +++ b/tests/qtest/cpu-plug-test.c @@ -190,7 +190,7 @@ int main(int argc, char **argv) qtest_cb_for_every_machine(add_pseries_test_case, g_test_quick()); } else if (g_str_equal(arch, "s390x")) { qtest_cb_for_every_machine(add_s390x_test_case, g_test_quick()); - } else if (g_str_equal(arch, "loongarch64")) { + } else if (g_str_equal(arch, "loongarch64") && qtest_has_machine("virt")) { add_loongarch_test_case("virt"); } -- cgit 1.4.1