[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v4 09/15] tests/qtest: Adjust device-introspect-test to alway
From: |
Fabiano Rosas |
Subject: |
[RFC PATCH v4 09/15] tests/qtest: Adjust device-introspect-test to always set a -cpu option |
Date: |
Thu, 19 Jan 2023 10:54:18 -0300 |
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
tests/qtest/device-introspect-test.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/tests/qtest/device-introspect-test.c
b/tests/qtest/device-introspect-test.c
index 5b0ffe43f5..7d6ff6e3ef 100644
--- a/tests/qtest/device-introspect-test.c
+++ b/tests/qtest/device-introspect-test.c
@@ -304,17 +304,30 @@ static void test_abstract_interfaces(void)
qtest_quit(qts);
}
+static const char *arch_get_cpu(const char *mname)
+{
+ const char *arch = qtest_get_arch();
+
+ if (g_str_equal(arch, "aarch64")) {
+ if (!strncmp(mname, "virt", 4)) {
+ return "cortex-a57";
+ }
+ }
+
+ return NULL;
+}
+
static void add_machine_test_case(const char *mname)
{
char *path, *args;
path = g_strdup_printf("device/introspect/concrete/defaults/%s", mname);
- args = g_strdup_printf("-M %s", mname);
+ args = qtest_get_machine_args(mname, arch_get_cpu(mname), NULL);
qtest_add_data_func(path, args, test_device_intro_concrete);
g_free(path);
path = g_strdup_printf("device/introspect/concrete/nodefaults/%s", mname);
- args = g_strdup_printf("-nodefaults -M %s", mname);
+ args = qtest_get_machine_args(mname, arch_get_cpu(mname), "-nodefaults");
qtest_add_data_func(path, args, test_device_intro_concrete);
g_free(path);
}
--
2.35.3
- [RFC PATCH v4 05/15] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG, (continued)
- [RFC PATCH v4 05/15] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 06/15] tests/qtest: Add qtest_get_machine_args, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 07/15] tests/qtest: Adjust qom-test to always set a -cpu option, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 08/15] tests/qtest: Adjust test-hmp to always pass -cpu option, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 09/15] tests/qtest: Adjust device-introspect-test to always set a -cpu option,
Fabiano Rosas <=
- [RFC PATCH v4 10/15] tests/qtest: aarch64: Set -cpu for numa-test, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 11/15] tests/qemu-iotests: Allow passing a -cpu option in the QEMU cmdline, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 12/15] tests/tcg: Do not build/run TCG tests if TCG is disabled, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 13/15] target/avocado: Pass parameters to migration test on aarch64, Fabiano Rosas, 2023/01/19
- [RFC PATCH v4 14/15] arm/Kconfig: Always select SEMIHOSTING when TCG is present, Fabiano Rosas, 2023/01/19