From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Cleber Rosa <crosa@redhat.com>,
Sergey Kambalin <sergey.kambalin@auriga.com>,
qemu-arm@nongnu.org,
Wainer dos Santos Moschetta <wainersm@redhat.com>,
Beraldo Leal <bleal@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH 1/4] tests/functional: Add a class containing Linux kernel helpers
Date: Tue, 27 Aug 2024 07:34:42 +0200 [thread overview]
Message-ID: <e66847a0-7390-42d9-a51d-190e0734d25e@redhat.com> (raw)
In-Reply-To: <20240826221058.75126-2-philmd@linaro.org>
On 27/08/2024 00.10, Philippe Mathieu-Daudé wrote:
> Use the 'linux_kernel' namespace to provide common helpers
> to functional tests booting a Linux kernel.
>
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> tests/functional/qemu_test/linux_kernel.py | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
> create mode 100644 tests/functional/qemu_test/linux_kernel.py
>
> diff --git a/tests/functional/qemu_test/linux_kernel.py b/tests/functional/qemu_test/linux_kernel.py
> new file mode 100644
> index 0000000000..917beb7fb6
> --- /dev/null
> +++ b/tests/functional/qemu_test/linux_kernel.py
> @@ -0,0 +1,19 @@
> +# Linux kernel functional test helpers
> +#
> +# Copyright (c) 2024 Linaro Ltd.
> +#
> +# Author:
> +# Philippe Mathieu-Daudé <philmd@linaro.org>
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +
> +from . import wait_for_console_pattern
> +
> +KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
> +
> +KERNEL_PANIC_MESSAGE = 'Kernel panic - not syncing'
> +
> +def linux_kernel_wait_for_pattern(test, success_message):
> + wait_for_console_pattern(test,
> + success_message=success_message,
> + failure_message=KERNEL_PANIC_MESSAGE)
I'd prefer to have the whole LinuxKernelTest class here (without the
BootLinuxConsole class of course), that way the modifications that we have
to do to the converted tests are definitely smaller when we don't have to
change the "wait_for_console_pattern" lines everywhere. And it's also nicer
if the variables are properly wrapped in a class.
Thomas
next prev parent reply other threads:[~2024-08-27 5:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 22:10 [PATCH 0/4] tests/functional: Convert Raspberry Pi avocado tests Philippe Mathieu-Daudé
2024-08-26 22:10 ` [PATCH 1/4] tests/functional: Add a class containing Linux kernel helpers Philippe Mathieu-Daudé
2024-08-27 5:34 ` Thomas Huth [this message]
2024-08-27 9:21 ` Philippe Mathieu-Daudé
2024-08-27 12:29 ` Thomas Huth
2024-08-27 12:31 ` [PATCH 0/2] tests/functional: Add LinuxKernelTest class and convert Q800 test Thomas Huth
2024-08-27 12:31 ` [PATCH 1/2] tests/functional: Add the LinuxKernelTest for testing the Linux boot process Thomas Huth
2024-08-27 12:31 ` [PATCH 2/2] tests/functional: Convert the m68k Q800 Avocado test into a functional test Thomas Huth
2024-08-26 22:10 ` [PATCH 2/4] tests/functional: Convert ARM Raspi2 avocado tests Philippe Mathieu-Daudé
2024-08-26 22:10 ` [PATCH 3/4] tests/functional: Convert Aarch64 Raspi3 " Philippe Mathieu-Daudé
2024-08-26 22:10 ` [PATCH 4/4] tests/functional: Convert Aarch64 Raspi4 " Philippe Mathieu-Daudé
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=e66847a0-7390-42d9-a51d-190e0734d25e@redhat.com \
--to=thuth@redhat.com \
--cc=bleal@redhat.com \
--cc=crosa@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sergey.kambalin@auriga.com \
--cc=wainersm@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 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).