Signed-off-by: Fabiano Rosas <[email protected]>
---
tests/qtest/arm-cpu-features.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c
index 4be1415823..9a052e41fc 100644
--- a/tests/qtest/arm-cpu-features.c
+++ b/tests/qtest/arm-cpu-features.c
@@ -217,6 +217,15 @@ static void assert_bad_props(QTestState *qts, const char
*cpu_type)
qobject_unref(resp);
}
+static bool tcg_disabled(void)
+{
+#ifndef CONFIG_TCG
+ return true;
+#else
+ return false;
+#endif
+}
+
static uint64_t resp_get_sve_vls(QDict *resp)
{
QDict *props;
@@ -338,6 +347,11 @@ static void sve_tests_sve_max_vq_8(const void *data)
{
QTestState *qts;
+ if (tcg_disabled()) {
+ g_test_skip("TCG support disabled in this build");
+ return;
+ }
+
qts = qtest_init(MACHINE "-cpu max,sve-max-vq=8");
assert_sve_vls(qts, "max", BIT_ULL(8) - 1, NULL);
@@ -373,6 +387,11 @@ static void sve_tests_sve_off(const void *data)
{
QTestState *qts;
+ if (tcg_disabled()) {
+ g_test_skip("TCG support is disabled in this build");
+ return;
+ }
+
qts = qtest_init(MACHINE "-cpu max,sve=off");
/* SVE is off, so the map should be empty. */
@@ -429,6 +448,11 @@ static void test_query_cpu_model_expansion(const void
*data)
{
QTestState *qts;
+ if (tcg_disabled()) {
+ g_test_skip("TCG support disabled in this build");
+ return;
+ }
+
qts = qtest_init(MACHINE "-cpu max");
/* Test common query-cpu-model-expansion input validation */
--
2.35.3