From: Cornelia Huck <cohuck@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Willian Rampazzo" <willianr@redhat.com>,
qemu-s390x@nongnu.org, "Cleber Rosa" <crosa@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH] tests/acceptance: Add a test with the Fedora 31 kernel and initrd
Date: Wed, 16 Dec 2020 12:41:35 +0100 [thread overview]
Message-ID: <20201216124135.7a7d5ec9.cohuck@redhat.com> (raw)
In-Reply-To: <6948dfc6-5ec4-6d7f-2c76-fe8449b8aa14@redhat.com>
On Wed, 16 Dec 2020 12:32:22 +0100
Thomas Huth <thuth@redhat.com> wrote:
> On 16/12/2020 11.57, Thomas Huth wrote:
> > + # Disable blinking cursor, then write some stuff into the framebuffer
> > + # ("32-bit encoded", the screendump PPM will then only contain 24-bit)
>
> As just discussed offline with Cornelia, this maybe needs some more
> explanation, so I'd suggest to add something like:
>
> # Disable blinking cursor, then write some stuff into the
> # framebuffer. QEMU's PPM screendumps contain uncompressed
> # 24-bit values, while the framebuffer uses 32-bit, so we
> # pad our text with some spaces when writing to the frame-
> # buffer. Since the PPM is uncompressed, we then can simple
> # read the written "magic bytes" back from the PPM file to
> # check whether the framebuffer is working as expected.
>
> Does that sound ok?
Sound good to me.
>
> Thomas
>
>
> > + exec_command_and_wait_for_pattern(self,
> > + 'echo -e "\e[?25l" > /dev/tty0', ':/#')
> > + exec_command_and_wait_for_pattern(self, 'for ((i=0;i<500;i++)); do '
> > + 'echo " The qu ick fo x j ump s o ver a laz y d og" >> fox.txt;'
> > + 'done',
> > + ':/#')
> > + exec_command_and_wait_for_pattern(self,
> > + 'dd if=fox.txt of=/dev/fb0 bs=1000 oflag=sync,nocache ; rm fox.txt',
> > + '24+0 records out')
> > + tmpfile = tempfile.NamedTemporaryFile(suffix='.ppm',
> > + prefix='qemu-scrdump-')
> > + self.vm.command('screendump', filename=tmpfile.name)
> > + ppmfile = open(tmpfile.name, "r")
> > + tmpfile.close
> > + line = ppmfile.readline()
> > + self.assertEqual(line, "P6\n")
> > + line = ppmfile.readline()
> > + self.assertEqual(line, "1024 768\n")
> > + line = ppmfile.readline()
> > + self.assertEqual(line, "255\n")
> > + line = ppmfile.readline()
> > + self.assertEqual(line, "The quick fox jumps over a lazy dog\n")
> > + ppmfile.close
> >
>
next prev parent reply other threads:[~2020-12-16 11:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 10:57 [PATCH] tests/acceptance: Add a test with the Fedora 31 kernel and initrd Thomas Huth
2020-12-16 11:32 ` Thomas Huth
2020-12-16 11:41 ` Cornelia Huck [this message]
2020-12-16 11:32 ` Cornelia Huck
2020-12-16 11:36 ` Thomas Huth
2020-12-16 11:40 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201216124135.7a7d5ec9.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=crosa@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
--cc=willianr@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.