qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] avocado_qemu: allow cross-arch tests
@ 2023-01-18 12:43 Daniel Henrique Barboza
  2023-01-18 12:43 ` [PATCH 1/3] avocado_qemu: enhance CANCEL message in QemuBaseTest:setUp() Daniel Henrique Barboza
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Daniel Henrique Barboza @ 2023-01-18 12:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel Henrique Barboza, Cleber Rosa, Philippe Mathieu-Daudé,
	Beraldo Leal

Hi,

In these changes I've introduced two new avocado env variables to allow
users to run 'check-avocado' with different archs and machines in tests
that doesn't set any arch/machine to run with.

This is useful for archs that doesn't have abundance of real hardware
available (e.g. RISC-V), meaning that we end up running 'check-avocado'
in non-RISCV hosts every time, and most tests ends up being cancelled
because the test always defaults to the host arch. For example, building
QEMU for riscv64 in a x86_64 host will cancel all tests:

$ make check-avocado
(...)
RESULTS    : PASS 0 | ERROR 0 | FAIL 0 | SKIP 1 | WARN 0 | INTERRUPT 0 | CANCEL 11

After the changes implemented here, one can use env variables to force
the tests to a default arch and machine. In the scenario mentioned
above:

$ AVOCADO_DEFAULT_ARCH=riscv64 AVOCADO_DEFAULT_MACHINE=virt make check-avocado
(...)
RESULTS    : PASS 11 | ERROR 0 | FAIL 0 | SKIP 1 | WARN 0 | INTERRUPT 0 | CANCEL 0

Note that test behavior changes only when the env vars are set. There is
no change made in the regular work of 'check-avocado'.

Cc: Cleber Rosa <crosa@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Beraldo Leal <bleal@redhat.com>

Daniel Henrique Barboza (3):
  avocado_qemu: enhance CANCEL message in QemuBaseTest:setUp()
  avocado_qemu: add AVOCADO_DEFAULT_ARCH for cross-arch tests
  avocado_qemu: add AVOCADO_DEFAULT_MACHINE

 docs/devel/testing.rst                 | 15 ++++++++++++---
 tests/avocado/avocado_qemu/__init__.py | 22 +++++++++++++++-------
 2 files changed, 27 insertions(+), 10 deletions(-)

-- 
2.39.0



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-01-18 17:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18 12:43 [PATCH 0/3] avocado_qemu: allow cross-arch tests Daniel Henrique Barboza
2023-01-18 12:43 ` [PATCH 1/3] avocado_qemu: enhance CANCEL message in QemuBaseTest:setUp() Daniel Henrique Barboza
2023-01-18 15:24   ` Fabiano Rosas
2023-01-18 12:43 ` [PATCH 2/3] avocado_qemu: add AVOCADO_DEFAULT_ARCH for cross-arch tests Daniel Henrique Barboza
2023-01-18 15:23   ` Fabiano Rosas
2023-01-18 16:06     ` Daniel Henrique Barboza
2023-01-18 12:43 ` [PATCH 3/3] avocado_qemu: add AVOCADO_DEFAULT_MACHINE Daniel Henrique Barboza
2023-01-18 15:42   ` Fabiano Rosas
2023-01-18 17:21     ` Daniel Henrique Barboza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).