summary refs log tree commit diff stats
path: root/tests/qtest/libqtest.h
diff options
context:
space:
mode:
authorAni Sinha <anisinha@redhat.com>2024-06-10 21:22:59 +0530
committerThomas Huth <thuth@redhat.com>2024-06-12 10:19:57 +0200
commitf43f8abe457a4aa32441bd190638e1118d291c42 (patch)
tree8d3791419be3f7818904408fb71a4aa4c902d7a1 /tests/qtest/libqtest.h
parent07c8d9ac0fa30712fdf78046a7998ee8d2231d6f (diff)
downloadfocaccia-qemu-f43f8abe457a4aa32441bd190638e1118d291c42.tar.gz
focaccia-qemu-f43f8abe457a4aa32441bd190638e1118d291c42.zip
tests/qtest/libqtest: add qtest_has_cpu_model() api
Added a new test api qtest_has_cpu_model() in order to check availability of
some cpu models in the current QEMU binary. The specific architecture of the
QEMU binary is selected using the QTEST_QEMU_BINARY environment variable.
This api would be useful to run tests against some older cpu models after
checking if QEMU actually supported these models.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20240610155303.7933-3-anisinha@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/libqtest.h')
-rw-r--r--tests/qtest/libqtest.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqtest.h
index 6e3d3525bf..beb96b18eb 100644
--- a/tests/qtest/libqtest.h
+++ b/tests/qtest/libqtest.h
@@ -950,6 +950,14 @@ bool qtest_has_machine(const char *machine);
 bool qtest_has_machine_with_env(const char *var, const char *machine);
 
 /**
+ * qtest_has_cpu_model:
+ * @cpu: The cpu to look for
+ *
+ * Returns: true if the cpu is available in the target binary.
+ */
+bool qtest_has_cpu_model(const char *cpu);
+
+/**
  * qtest_has_device:
  * @device: The device to look for
  *