On 01/03/2024 11.21, Peter Maydell wrote:
On Wed, 28 Feb 2024 at 12:06, Thomas Huth <th...@redhat.com> wrote:

On 28/02/2024 12.31, Inès Varhol wrote:
TLDR: how can I provide a test or an example?

I've tested the display by running custom executables and
comparing to the result on the real board, but I don't
know how to test it using a QTest.

I'd suggest to try to take a screenshot via QMP or HMP. If you need a third
party binary to get something on the screen, it's maybe best to write an
avocado test instead of a qtest. See for example
tests/avocado/machine_m68k_nextcube.py - it takes a screenshot and then
converts the console messages from it via Tessaract to text and looks for
the expected strings there. Alternatively, have a look at
tests/avocado/machine_s390_ccw_virtio.py - it boots a Linux in the guest
that writes a string into the /dev/fb0 framebuffer, then takes a screendump
and then tries to find the string in the file. The latter could maybe also
be done via a qtest if you know how to set up the framebuffer without a
guest kernel.

The other extremely popular approach for testing display devices
is "I looked at the screen while I was doing the development,
and it was fine" :-)

Well, but that doesn't help that much against regressions that can occur in the course of time...

 Thomas


Reply via email to