qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Fabien Chouteau" <chouteau@adacore.com>,
	"KONRAD Frederic" <frederic.konrad@adacore.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [Qemu-devel] [PATCH 2/3] tests/acceptance: Add test that boots Linux up to BusyBox on Leon3
Date: Thu, 27 Jun 2019 13:53:30 +0200	[thread overview]
Message-ID: <20190627115331.2373-3-f4bug@amsat.org> (raw)
In-Reply-To: <20190627115331.2373-1-f4bug@amsat.org>

Gaisler provides convenient images:
https://www.gaisler.com/index.php/downloads/linux

HOWTO build:
https://www.gaisler.com/index.php/products/operating-systems/linux

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/acceptance/machine_sparc_leon3.py | 31 +++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/tests/acceptance/machine_sparc_leon3.py b/tests/acceptance/machine_sparc_leon3.py
index 0bbae44f85..b3039b5d30 100644
--- a/tests/acceptance/machine_sparc_leon3.py
+++ b/tests/acceptance/machine_sparc_leon3.py
@@ -37,6 +37,11 @@ class Leon3Machine(Test):
                 fail = 'Failure message found in console: %s' % failure_message
                 self.fail(fail)
 
+    def exec_command_and_wait_for_pattern(self, command, success_message):
+        command += '\n'
+        self.vm.console_socket.sendall(command.encode())
+        self.wait_for_console_pattern(success_message)
+
     def test_leon3_helenos_uimage(self):
         """
         :avocado: tags=arch:sparc
@@ -56,3 +61,29 @@ class Leon3Machine(Test):
 
         self.wait_for_console_pattern('Copyright (c) 2001-2014 HelenOS project')
         self.wait_for_console_pattern('Booting the kernel ...')
+
+    def test_leon3_linux_kernel_4_9_busybox(self):
+        """
+        :avocado: tags=arch:sparc
+        :avocado: tags=machine:leon3
+        """
+        kernel_url = ('https://www.gaisler.com/anonftp/linux/linux-4/images/'
+                     'leon-linux-4.9/leon-linux-4.9-1.0/up/image.ram')
+        kernel_hash = '289bd1bcca10cda76d0ef2264a8657adc251f5f5'
+        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+
+        self.vm.set_machine('leon3_generic')
+        self.vm.set_console()
+        self.vm.add_args('-kernel', kernel_path)
+
+        self.vm.launch()
+
+        self.wait_for_console_pattern('TYPE: Leon3 System-on-a-Chip')
+
+        self.wait_for_console_pattern('Welcome to Buildroot')
+
+        self.wait_for_console_pattern('buildroot login:')
+        self.exec_command_and_wait_for_pattern('root', '#')
+        uname = 'Linux buildroot 4.9.54-00018-g62dab2c #2 ' \
+                'Wed Oct 18 09:45:51 CEST 2017 sparc GNU/Linux'
+        self.exec_command_and_wait_for_pattern('uname -a', uname)
-- 
2.19.1



  parent reply	other threads:[~2019-06-27 11:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27 11:53 [Qemu-devel] [PATCH 0/3] tests/acceptance: Add tests for the Leon3 board Philippe Mathieu-Daudé
2019-06-27 11:53 ` [Qemu-devel] [PATCH 1/3] tests/acceptance: Add test that boots the HelenOS microkernel on Leon3 Philippe Mathieu-Daudé
2019-06-27 11:53 ` Philippe Mathieu-Daudé [this message]
2019-06-27 11:53 ` [Qemu-devel] [PATCH 3/3] .travis.yml: Let the avocado job run the Leon3 test Philippe Mathieu-Daudé
2019-06-27 12:28 ` [Qemu-devel] [PATCH 0/3] tests/acceptance: Add tests for the Leon3 board KONRAD Frederic
2019-06-27 12:46   ` Philippe Mathieu-Daudé
2019-10-17 12:54 ` 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=20190627115331.2373-3-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=alex.bennee@linaro.org \
    --cc=chouteau@adacore.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=frederic.konrad@adacore.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).