aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/numa-test.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-05-09 19:00:44 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-05-10 15:45:15 +0200
commit6bd92a7c62648eb37053ccc809c3cab7d7629584 (patch)
tree6a8f134ef44943df74672fe9a6da7061ca1c3f3d /tests/qtest/numa-test.c
parent1b1badf3c523105d4cf5e6ccf8413d1be1dbadc4 (diff)
downloadqemu-6bd92a7c62648eb37053ccc809c3cab7d7629584.zip
qemu-6bd92a7c62648eb37053ccc809c3cab7d7629584.tar.gz
qemu-6bd92a7c62648eb37053ccc809c3cab7d7629584.tar.bz2
tests/qtest: arm: fix operation in a build without any boards or devices
ARM/aarch64 are easy to fix because they already have to pass a machine type by hand. Just guard the tests with a check that the machine actually exists. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240509170044.190795-14-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/qtest/numa-test.c')
-rw-r--r--tests/qtest/numa-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c
index 4f4404a..7aa262d 100644
--- a/tests/qtest/numa-test.c
+++ b/tests/qtest/numa-test.c
@@ -558,6 +558,9 @@ int main(int argc, char **argv)
}
if (g_str_equal(arch, "aarch64")) {
+ if (!qtest_has_machine("virt")) {
+ goto out;
+ }
g_string_append(args, " -machine virt");
}
@@ -590,5 +593,6 @@ int main(int argc, char **argv)
aarch64_numa_cpu);
}
+out:
return g_test_run();
}