From: Cleber Rosa <crosa@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Alistair Francis <alistair@alistair23.me>,
qemu-devel@nongnu.org, Subbaraya Sundeep <sundeep.lkml@gmail.com>,
qemu-arm@nongnu.org, Caio Carrara <ccarrara@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board
Date: Thu, 23 May 2019 10:07:07 -0400 (EDT) [thread overview]
Message-ID: <1573198914.24360394.1558620427447.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20190520220635.10961-3-f4bug@amsat.org>
----- Original Message -----
> From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
> To: qemu-devel@nongnu.org
> Cc: "Eduardo Habkost" <ehabkost@redhat.com>, "Caio Carrara" <ccarrara@redhat.com>, "Alistair Francis"
> <alistair@alistair23.me>, "Subbaraya Sundeep" <sundeep.lkml@gmail.com>, qemu-arm@nongnu.org, "Cleber Rosa"
> <crosa@redhat.com>, "Peter Maydell" <peter.maydell@linaro.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
> Sent: Monday, May 20, 2019 6:06:35 PM
> Subject: [PATCH 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board
>
> Similar to the x86_64/pc test, it boots a Linux kernel on an
> Emcraft board and verify the serial is working.
>
> If ARM is a target being built, "make check-acceptance" will
> automatically include this test by the use of the "arch:arm" tags.
>
> Alternatively, this test can be run using:
>
> $ avocado run -t arch:arm tests/acceptance
> $ avocado run -t machine:emcraft-sf2 tests/acceptance
>
> Based on the recommended test setup from Subbaraya Sundeep:
> https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg03810.html
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tests/acceptance/boot_linux_console.py | 27 ++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py
> b/tests/acceptance/boot_linux_console.py
> index f593f3858e..844cb80bb5 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -178,6 +178,33 @@ class BootLinuxConsole(Test):
> console_pattern = 'Kernel command line: %s' % kernel_command_line
> self.wait_for_console_pattern(console_pattern)
>
> + def test_arm_emcraft_sf2(self):
> + """
> + :avocado: tags=arch:arm
> + :avocado: tags=machine:emcraft-sf2
> + :avocado: tags=endian:little
> + """
> + uboot_url = ('https://raw.githubusercontent.com/'
> + 'Subbaraya-Sundeep/qemu-test-binaries/'
> + 'fa030bd77a014a0b8e360d3b7011df89283a2f0b/u-boot')
> + uboot_hash = 'abba5d9c24cdd2d49cdc2a8aa92976cf20737eff'
> + uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash)
> + spi_url = ('https://raw.githubusercontent.com/'
> + 'Subbaraya-Sundeep/qemu-test-binaries/'
> + 'fa030bd77a014a0b8e360d3b7011df89283a2f0b/spi.bin')
> + spi_hash = '85f698329d38de63aea6e884a86fbde70890a78a'
> + spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash)
> +
> + self.vm.set_machine('emcraft-sf2')
> + self.vm.set_console()
> + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
The kernel_command_line variable is not needed...
> + self.vm.add_args('-kernel', uboot_path,
> + '-append', kernel_command_line,
... and you can just use self.KERNEL_COMMON_COMMAND_LINE here.
> + '-drive', 'file=' + spi_path +
> ',if=mtd,format=raw',
Nitpick: it's more Pythonic to format strings than to concatenate
them.
> + '-no-reboot')
> + self.vm.launch()
> + self.wait_for_console_pattern('init started: BusyBox')
Another nitpick is, given that image is pinned down, maybe attempt to
match against the entire line?
init started: BusyBox v1.24.1 (2017-05-15 09:57:00 IST)
> +
> def test_s390x_s390_ccw_virtio(self):
> """
> :avocado: tags=arch:s390x
> --
> 2.19.1
>
>
Because of the other discussions about tests and timeouts, this is
what I get on a first run (having to download the images):
(1/1) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (27.49 s)
And then, a pretty consistent < 8s mark using the resources from
cache:
(01/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (7.55 s)
(02/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (7.35 s)
(03/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (7.40 s)
(04/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (7.60 s)
(05/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (7.62 s)
(06/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (7.33 s)
(07/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (7.35 s)
(08/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (6.38 s)
(09/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (7.39 s)
(10/10) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (7.44 s)
It'd be nice to know the average test execution time on real/typical
hardware, and with that, starting to adjust expected timeouts. Anyway:
Tested-by: Cleber Rosa <crosa@redhat.com>
next prev parent reply other threads:[~2019-05-23 14:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 22:06 [Qemu-devel] [PATCH 0/2] tests: Avocado-test for the SmartFusion2 board Philippe Mathieu-Daudé
2019-05-20 22:06 ` [Qemu-devel] [PATCH 1/2] BootLinuxConsoleTest: Do not log empty lines Philippe Mathieu-Daudé
2019-05-20 22:34 ` Alistair Francis
2019-05-23 13:48 ` Cleber Rosa
2019-06-05 15:57 ` Cleber Rosa
2019-06-05 20:52 ` Aleksandar Markovic
2019-05-20 22:06 ` [Qemu-devel] [PATCH 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board Philippe Mathieu-Daudé
2019-05-20 22:35 ` Alistair Francis
2019-05-23 14:07 ` Cleber Rosa [this message]
2019-06-05 16:06 ` Cleber Rosa
2019-06-05 20:43 ` Eduardo Habkost
2019-06-06 18:29 ` Cleber Rosa
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=1573198914.24360394.1558620427447.JavaMail.zimbra@redhat.com \
--to=crosa@redhat.com \
--cc=alistair@alistair23.me \
--cc=ccarrara@redhat.com \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sundeep.lkml@gmail.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).