[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/3] tests/qtest/libqtest: add qtest_has_cpu() api
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 2/3] tests/qtest/libqtest: add qtest_has_cpu() api |
Date: |
Mon, 10 Jun 2024 16:38:46 +0200 |
User-agent: |
Mozilla Thunderbird |
Hi Ani,
On 10/6/24 15:21, Ani Sinha wrote:
Added a new test api qtest_has_cpu() 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.
CC: thuth@redhat.com
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/qtest/libqtest.c | 83 ++++++++++++++++++++++++++++++++++++++++++
tests/qtest/libqtest.h | 8 ++++
2 files changed, 91 insertions(+)
Since "CPU" commonly refers to a CPU state, I suggest renaming as:
+struct CpuInfo {
CpuModel
+static struct CpuInfo *qtest_get_cpus(void)
qtest_get_cpu_models()
+bool qtest_has_cpu(const char *cpu)
qtest_has_cpu_model()
Regards,
Phil.