[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/35] tests/qtest: Adjust and document query-cpu-model-expansion
|
From: |
Peter Maydell |
|
Subject: |
[PULL 06/35] tests/qtest: Adjust and document query-cpu-model-expansion test for arm |
|
Date: |
Tue, 2 May 2023 13:14:30 +0100 |
From: Fabiano Rosas <farosas@suse.de>
We're about to move the 32-bit CPUs under CONFIG_TCG, so adjust the
query-cpu-model-expansion test to check against the cortex-a7, which
is already under CONFIG_TCG. That allows the next patch to contain
only code movement. (All the test cares about is that the CPU type
it's checking is one which definitely doesn't work under KVM.)
While here add comments clarifying what we're testing.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-id: 20230426180013.14814-7-farosas@suse.de
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
tests/qtest/arm-cpu-features.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c
index 1cb08138ad1..3fc33fc24dd 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");
--
2.34.1
- [PULL 27/35] hw/net/msf2-emac: Don't modify descriptor in-place in emac_store_desc(), (continued)
- [PULL 27/35] hw/net/msf2-emac: Don't modify descriptor in-place in emac_store_desc(), Peter Maydell, 2023/05/02
- [PULL 23/35] hmp: Add 'one-insn-per-tb' command equivalent to 'singlestep', Peter Maydell, 2023/05/02
- [PULL 16/35] make one-insn-per-tb an accel option, Peter Maydell, 2023/05/02
- [PULL 31/35] hw/intc/allwinner-a10-pic: Don't use set_bit()/clear_bit(), Peter Maydell, 2023/05/02
- [PULL 33/35] target/arm: Add compile time asserts to load/store_cpu_field macros, Peter Maydell, 2023/05/02
- [PULL 24/35] qapi/run-state.json: Fix missing newline at end of file, Peter Maydell, 2023/05/02
- [PULL 32/35] target/arm: Define and use new load_cpu_field_low32(), Peter Maydell, 2023/05/02
- [PULL 05/35] target/arm: Move 64-bit TCG CPUs into tcg/, Peter Maydell, 2023/05/02
- [PULL 22/35] accel/tcg: Report one-insn-per-tb in 'info jit', not 'info status', Peter Maydell, 2023/05/02
- [PULL 10/35] arm/Kconfig: Always select SEMIHOSTING when TCG is present, Peter Maydell, 2023/05/02
- [PULL 06/35] tests/qtest: Adjust and document query-cpu-model-expansion test for arm,
Peter Maydell <=
- [PULL 08/35] tests/qtest: Fix tests when no KVM or TCG are present, Peter Maydell, 2023/05/02
- [PULL 12/35] tests/qtest: Restrict tpm-tis-i2c-test to CONFIG_TCG, Peter Maydell, 2023/05/02
- [PULL 13/35] gitlab-ci: Check building KVM-only aarch64 target, Peter Maydell, 2023/05/02
- [PULL 17/35] softmmu: Don't use 'singlestep' global in QMP and HMP commands, Peter Maydell, 2023/05/02
- [PULL 21/35] Document that -singlestep command line option is deprecated, Peter Maydell, 2023/05/02
- [PULL 18/35] accel/tcg: Use one_insn_per_tb global instead of old singlestep global, Peter Maydell, 2023/05/02
- [PULL 11/35] arm/Kconfig: Do not build TCG-only boards on a KVM-only build, Peter Maydell, 2023/05/02