diff mbox series

[2/5] qtest/meson.build: check CONFIG_TCG for boot-serial-test in qtests_ppc

Message ID 20220303153517.168943-3-danielhb413@gmail.com (mailing list archive)
State New, archived
Headers show
Series --disable-tcg qtest/avocado fixes for ppc64 | expand

Commit Message

Daniel Henrique Barboza March 3, 2022, 3:35 p.m. UTC
'boot-serial-test' does not work with a QEMU built with --disable-tcg in
a IBM POWER9 host. The reason is that without TCG QEMU will default to
KVM acceleration, but then the KVM module in IBM POWER hosts aren't able
to handle other CPUs.

The result is that the test will break with a KVM error when trying to
ruin the ppce500 test:

$ QTEST_QEMU_BINARY=./qemu-system-ppc64 ./tests/qtest/boot-serial-test
/ppc64/boot-serial/ppce500: qemu-system-ppc64: -accel tcg: invalid accelerator tcg
error: kvm run failed Invalid argument
NIP 0000000000f00000   LR 0000000000000000 CTR 0000000000000000 XER 0000000000000000 CPU#0
MSR 0000000000000000 HID0 0000000000000000  HF 24020002 iidx 1 didx 1
TB 00000000 00000000 DECR 0
(...)
** (./tests/qtest/boot-serial-test:1935760): ERROR **: 07:44:03.010: Failed to find expected string. Please check '/tmp/qtest-boot-serial-sJ78sqg'

Fix it by checking CONFIG_TCG before compiling boot-serial-test.

Cc: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/qtest/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Huth March 7, 2022, 8 a.m. UTC | #1
On 03/03/2022 16.35, Daniel Henrique Barboza wrote:
> 'boot-serial-test' does not work with a QEMU built with --disable-tcg in
> a IBM POWER9 host. The reason is that without TCG QEMU will default to
> KVM acceleration, but then the KVM module in IBM POWER hosts aren't able
> to handle other CPUs.
> 
> The result is that the test will break with a KVM error when trying to
> ruin the ppce500 test:
> 
> $ QTEST_QEMU_BINARY=./qemu-system-ppc64 ./tests/qtest/boot-serial-test
> /ppc64/boot-serial/ppce500: qemu-system-ppc64: -accel tcg: invalid accelerator tcg
> error: kvm run failed Invalid argument
> NIP 0000000000f00000   LR 0000000000000000 CTR 0000000000000000 XER 0000000000000000 CPU#0
> MSR 0000000000000000 HID0 0000000000000000  HF 24020002 iidx 1 didx 1
> TB 00000000 00000000 DECR 0
> (...)
> ** (./tests/qtest/boot-serial-test:1935760): ERROR **: 07:44:03.010: Failed to find expected string. Please check '/tmp/qtest-boot-serial-sJ78sqg'
> 
> Fix it by checking CONFIG_TCG before compiling boot-serial-test.
> 
> Cc: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> ---
>   tests/qtest/meson.build | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index 0c2f2d94e1..deed640d7f 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -161,7 +161,8 @@ qtests_ppc = \
>     (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +            \
>     (config_all_devices.has_key('CONFIG_M48T59') ? ['m48t59-test'] : []) +                     \
>     (config_all_devices.has_key('CONFIG_TCG') ? ['prom-env-test'] : []) +                      \
> -  ['boot-order-test', 'boot-serial-test']
> +  (config_all_devices.has_key('CONFIG_TCG') ? ['boot-serial-test'] : []) +                   \
> +  ['boot-order-test']
>   
>   qtests_ppc64 = \
>     qtests_ppc + \

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 0c2f2d94e1..deed640d7f 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -161,7 +161,8 @@  qtests_ppc = \
   (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +            \
   (config_all_devices.has_key('CONFIG_M48T59') ? ['m48t59-test'] : []) +                     \
   (config_all_devices.has_key('CONFIG_TCG') ? ['prom-env-test'] : []) +                      \
-  ['boot-order-test', 'boot-serial-test']
+  (config_all_devices.has_key('CONFIG_TCG') ? ['boot-serial-test'] : []) +                   \
+  ['boot-order-test']
 
 qtests_ppc64 = \
   qtests_ppc + \