qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] machine.py fix for ppc64 tests + avocado changes
@ 2022-05-16 16:53 Daniel Henrique Barboza
  2022-05-16 16:53 ` [PATCH 1/5] avocado/empty_cpu_model.py: use machine:none tag Daniel Henrique Barboza
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Daniel Henrique Barboza @ 2022-05-16 16:53 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-ppc, david, clg, jsnow, crosa, f4bug, wainersm, bleal,
	Daniel Henrique Barboza

Hello,

This series fixes a problem I'm having when running avocado tests in an
IBM Power9 ppc64 host, without firmware modifications that breaks the
default machine options of a pseries guest running KVM, and with
--disable-tcg. The problem is described in detail in patch 02.

The proposed fix consists of checking whether we're running a pseries
guest in the launch() method of  machine.py. A simple fix, if we could
rely on the QEMUSystemTest self.machine attribute to be set all the time
a machine type is being set.

This is not the case for some tests, e.g. the empty_cpu_model.py test
that, instead of using 'tags=machine:none' to set the 'none' machine
type, it hardcodes '-machine none' via self.vm.add_args(). This doesn't
set self.machine in the QEMUSystemTest class, and then we're left
wondered whether the machine is being run with the binary defaults (i.e.
no machine were set) or if the machine were set manually and we need to
verify every -machine option to check it up. Which is not trivial by any
means: multiple machine options can be passed via avocado and  you'll
have to parse a string using all known machine types to see if it was
set or not. 

To fix the issue I needed to make the assumption that the machine type
will be set in a way that self.machine is also set (i.e. using the
avocado tag). Making this assumption for empty_cpu_model.py alone (patch
01) is enough for me to fix the issue I'm experiencing in patch 02.

I decided to make this assumption across the board in all tests that
were setting the machine type by hand instead of using an avocado tag.
So in the end, after this series, all avocado tests that sets a machine
type are now setting via "avocado: tags=machine:<type>" annotation. 


Daniel Henrique Barboza (5):
  avocado/empty_cpu_model.py: use machine:none tag
  machine.py: add default pseries params in machine.py
  avocado/multiprocess.py: use tags=machine:pc|virt
  avocado/boot_linux.py: avocado tag fixes in BootLinuxAarch64
  avocado/virtio-gpu.py: use tags=machine:pc

 python/qemu/machine/machine.py   | 13 +++++++++++++
 tests/avocado/boot_linux.py      |  7 +++----
 tests/avocado/empty_cpu_model.py |  5 ++++-
 tests/avocado/multiprocess.py    | 14 ++++++++------
 tests/avocado/virtio-gpu.py      |  6 ++++--
 5 files changed, 32 insertions(+), 13 deletions(-)

-- 
2.32.0



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

end of thread, other threads:[~2022-05-23 19:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-16 16:53 [PATCH 0/5] machine.py fix for ppc64 tests + avocado changes Daniel Henrique Barboza
2022-05-16 16:53 ` [PATCH 1/5] avocado/empty_cpu_model.py: use machine:none tag Daniel Henrique Barboza
2022-05-16 16:53 ` [PATCH 2/5] machine.py: add default pseries params in machine.py Daniel Henrique Barboza
2022-05-19 23:18   ` John Snow
2022-05-23 19:50     ` Matheus K. Ferst
2022-05-16 16:53 ` [PATCH 3/5] avocado/multiprocess.py: use tags=machine:pc|virt Daniel Henrique Barboza
2022-05-16 16:53 ` [PATCH 4/5] avocado/boot_linux.py: avocado tag fixes in BootLinuxAarch64 Daniel Henrique Barboza
2022-05-16 16:53 ` [PATCH 5/5] avocado/virtio-gpu.py: use tags=machine:pc 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).