qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v4 07/15] tests/qtest: Adjust qom-test to always set a -c


From: Richard Henderson
Subject: Re: [RFC PATCH v4 07/15] tests/qtest: Adjust qom-test to always set a -cpu option
Date: Thu, 19 Jan 2023 09:00:00 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 1/19/23 03:54, Fabiano Rosas wrote:
Start using the qtest_get_machine_args function, which explicitly
sets the -cpu option according to the machine default.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
  tests/qtest/qom-test.c | 19 +++++++++++++++++--
  1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c
index d380261f8f..462e3c4281 100644
--- a/tests/qtest/qom-test.c
+++ b/tests/qtest/qom-test.c
@@ -78,14 +78,28 @@ static void test_properties(QTestState *qts, const char 
*path, bool recurse)
      qobject_unref(response);
  }
+static const char *arch_get_cpu(const char *machine)
+{
+    const char *arch = qtest_get_arch();
+
+    if (g_str_equal(arch, "aarch64")) {
+        if (!strncmp(machine, "virt", 4)) {
+            return "cortex-a57";

I'm not keen on hard-coding cortex-a57 instead of max, even if they happen to evaluate to mostly the same thing currently for -accel qtest.

Nor am I keen on replicating this N times across N qtest files.
Better perhaps in libqtest.c, or something?
Or even directly in qtest_get_machine_args()?


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]