aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/qtest/arm-cpu-features.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c
index 1cb0813..3fc33fc 100644
--- a/tests/qtest/arm-cpu-features.c
+++ b/tests/qtest/arm-cpu-features.c
@@ -506,9 +506,23 @@ static void test_query_cpu_model_expansion_kvm(const void *data)
QDict *resp;
char *error;
- assert_error(qts, "cortex-a15",
- "We cannot guarantee the CPU type 'cortex-a15' works "
- "with KVM on this host", NULL);
+ /*
+ * When using KVM, only the 'host' and 'max' CPU models are
+ * supported. Test that we're emitting a suitable error for
+ * unsupported CPU models.
+ */
+ if (qtest_has_accel("tcg")) {
+ assert_error(qts, "cortex-a7",
+ "We cannot guarantee the CPU type 'cortex-a7' works "
+ "with KVM on this host", NULL);
+ } else {
+ /*
+ * With a KVM-only build the 32-bit CPUs are not present.
+ */
+ assert_error(qts, "cortex-a7",
+ "The CPU type 'cortex-a7' is not a "
+ "recognized ARM CPU type", NULL);
+ }
assert_has_feature_enabled(qts, "host", "aarch64");