* [Qemu-devel] [PATCH v2 0/2] tests: Avocado-test for the SmartFusion2 board
@ 2019-06-06 22:55 Philippe Mathieu-Daudé
2019-06-06 22:55 ` [Qemu-devel] [PATCH v2 1/2] BootLinuxConsoleTest: Do not log empty lines Philippe Mathieu-Daudé
2019-06-06 22:55 ` [Qemu-devel] [PATCH v2 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board Philippe Mathieu-Daudé
0 siblings, 2 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-06 22:55 UTC (permalink / raw)
To: qemu-devel, Eduardo Habkost
Cc: qemu-arm, Philippe Mathieu-Daudé, Subbaraya Sundeep
Hi,
I added test guide lines from Subbaraya Sundeep [*] to avoid this
board to bitrot.
v2: Addressed issues reported by Cleber
Regards,
Phil.
[*] https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg03810.html
Philippe Mathieu-Daudé (2):
BootLinuxConsoleTest: Do not log empty lines
BootLinuxConsoleTest: Test the SmartFusion2 board
tests/acceptance/boot_linux_console.py | 32 ++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH v2 1/2] BootLinuxConsoleTest: Do not log empty lines
2019-06-06 22:55 [Qemu-devel] [PATCH v2 0/2] tests: Avocado-test for the SmartFusion2 board Philippe Mathieu-Daudé
@ 2019-06-06 22:55 ` Philippe Mathieu-Daudé
2019-06-06 22:55 ` [Qemu-devel] [PATCH v2 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board Philippe Mathieu-Daudé
1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-06 22:55 UTC (permalink / raw)
To: qemu-devel, Eduardo Habkost
Cc: Philippe Mathieu-Daudé,
Subbaraya Sundeep, qemu-arm, Alistair Francis,
Aleksandar Markovic, Cleber Rosa
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Avoid to log empty lines in console debug logs.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
v2: no change
---
tests/acceptance/boot_linux_console.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index d5c500ea30..f593f3858e 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -37,8 +37,10 @@ class BootLinuxConsole(Test):
console = self.vm.console_socket.makefile()
console_logger = logging.getLogger('console')
while True:
- msg = console.readline()
- console_logger.debug(msg.strip())
+ msg = console.readline().strip()
+ if not msg:
+ continue
+ console_logger.debug(msg)
if success_message in msg:
break
if failure_message in msg:
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH v2 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board
2019-06-06 22:55 [Qemu-devel] [PATCH v2 0/2] tests: Avocado-test for the SmartFusion2 board Philippe Mathieu-Daudé
2019-06-06 22:55 ` [Qemu-devel] [PATCH v2 1/2] BootLinuxConsoleTest: Do not log empty lines Philippe Mathieu-Daudé
@ 2019-06-06 22:55 ` Philippe Mathieu-Daudé
2019-06-06 23:13 ` Cleber Rosa
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-06 22:55 UTC (permalink / raw)
To: qemu-devel, Eduardo Habkost
Cc: Cleber Rosa, qemu-arm, Alistair Francis,
Philippe Mathieu-Daudé,
Subbaraya Sundeep
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
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>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
---
v2: (Cleber)
- drop 'kernel_command_line'
- do no concat string, use format
- replace '-' by '_' in Avocado tags
---
tests/acceptance/boot_linux_console.py | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index f593f3858e..34527d4b38 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -178,6 +178,32 @@ 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()
+ self.vm.add_args('-kernel', uboot_path,
+ '-append', self.KERNEL_COMMON_COMMAND_LINE,
+ '-drive', 'file=%s,if=mtd,format=raw' % spi_path,
+ '-no-reboot')
+ self.vm.launch()
+ self.wait_for_console_pattern('init started: BusyBox')
+
def test_s390x_s390_ccw_virtio(self):
"""
:avocado: tags=arch:s390x
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board
2019-06-06 22:55 ` [Qemu-devel] [PATCH v2 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board Philippe Mathieu-Daudé
@ 2019-06-06 23:13 ` Cleber Rosa
0 siblings, 0 replies; 4+ messages in thread
From: Cleber Rosa @ 2019-06-06 23:13 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Eduardo Habkost, qemu-devel, Philippe Mathieu-Daudé,
Subbaraya Sundeep, qemu-arm, Alistair Francis
On Fri, Jun 07, 2019 at 12:55:21AM +0200, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> 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>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> Tested-by: Cleber Rosa <crosa@redhat.com>
> ---
> v2: (Cleber)
> - drop 'kernel_command_line'
> - do no concat string, use format
> - replace '-' by '_' in Avocado tags
> ---
> tests/acceptance/boot_linux_console.py | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
> index f593f3858e..34527d4b38 100644
> --- a/tests/acceptance/boot_linux_console.py
> +++ b/tests/acceptance/boot_linux_console.py
> @@ -178,6 +178,32 @@ 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()
> + self.vm.add_args('-kernel', uboot_path,
> + '-append', self.KERNEL_COMMON_COMMAND_LINE,
> + '-drive', 'file=%s,if=mtd,format=raw' % spi_path,
> + '-no-reboot')
> + self.vm.launch()
> + self.wait_for_console_pattern('init started: BusyBox')
> +
> def test_s390x_s390_ccw_virtio(self):
> """
> :avocado: tags=arch:s390x
> --
> 2.20.1
>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-06 23:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 22:55 [Qemu-devel] [PATCH v2 0/2] tests: Avocado-test for the SmartFusion2 board Philippe Mathieu-Daudé
2019-06-06 22:55 ` [Qemu-devel] [PATCH v2 1/2] BootLinuxConsoleTest: Do not log empty lines Philippe Mathieu-Daudé
2019-06-06 22:55 ` [Qemu-devel] [PATCH v2 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board Philippe Mathieu-Daudé
2019-06-06 23:13 ` Cleber Rosa
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.