From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Lukáš Doktor" <ldoktor@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Amador Pahim" <apahim@redhat.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
"Zheng Xiang" <xiang.zheng@linaro.org>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Fam Zheng" <famz@redhat.com>,
"Alistair Francis" <alistair23@gmail.com>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [Qemu-devel] [RFC PATCH 7/7] avocado: Add tests booting the Malta machine
Date: Thu, 19 Apr 2018 13:46:42 -0300 [thread overview]
Message-ID: <20180419164642.9536-8-f4bug@amsat.org> (raw)
In-Reply-To: <20180419164642.9536-1-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
tests/avocado/test_linux-boot-console.py | 92 +++++++++++++++++++
.../parameters.yaml | 2 +
2 files changed, 94 insertions(+)
diff --git a/tests/avocado/test_linux-boot-console.py b/tests/avocado/test_linux-boot-console.py
index f54d10dd79..4ae1e3bf37 100644
--- a/tests/avocado/test_linux-boot-console.py
+++ b/tests/avocado/test_linux-boot-console.py
@@ -86,3 +86,95 @@ class TestAlphaClipperBoot2_6(test.QemuTest):
def tearDown(self):
os.remove(self.console_path)
+
+
+class TestMips4kcMaltaBoot2_6(test.QemuTest):
+ """
+ :avocado: enable
+ :avocado: tags=arch_mips
+ """
+ ARCH = "mips"
+
+ def kernel_url(self):
+ return 'http://people.debian.org/~aurel32/qemu/mips/vmlinux-2.6.32-5-4kc-malta'
+
+ def setUp(self):
+ self.console_path = tempfile.mkstemp()[1]
+ kernel_path = cachedfile(self.kernel_url())
+ self.vm._args.extend(['-machine', 'malta'])
+ self.vm._args.extend(['-m', '64'])
+ self.vm._args.extend(['-kernel', kernel_path])
+ self.vm._args.extend(['-append', '"console=ttyS0 printk.time=0"'])
+ self.vm._args.extend(['-chardev', 'socket,id=uart0,server,nowait,path=' + self.console_path])
+ self.vm._args.extend(['-serial', 'chardev:uart0'])
+ self.vm._args.extend(['-nographic'])
+
+ def test_boot_console(self):
+ """
+ :avocado: tags=uart,printk
+ """
+ if self.params.get('arch') != self.ARCH:
+ return
+
+ self.vm.launch(self.console_path)
+ console = self.vm.get_console(console_address=self.console_path, login=False)
+ # no filesystem provided on purpose, wait for the Kernel panic
+ bootlog = console.read_until_any_line_matches(["Kernel panic - not syncing: VFS: Unable to mount root fs"], timeout=6.0)[1]
+ console.close()
+ # check Super I/O
+ self.assertIn(u'ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A', bootlog)
+ self.assertIn(u'ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A', bootlog)
+ self.assertIn(u'i8042 KBD port at 0x60,0x64 irq 1', bootlog)
+ self.assertIn(u'i8042 AUX port at 0x60,0x64 irq 12', bootlog)
+ # check PCI (network interface)
+ self.assertIn(u'registered as PCnet/PCI II 79C970A', bootlog)
+ self.vm.shutdown()
+
+ def tearDown(self):
+ os.remove(self.console_path)
+
+# FIXME this is a copy of TestMips4kcMaltaBoot2_6 with a different the kernel url
+class TestMips4kcMaltaBoot3_2(test.QemuTest):
+ """
+ :avocado: enable
+ :avocado: tags=arch_mips
+ """
+ ARCH = "mips"
+
+ def kernel_url(self):
+ return 'http://people.debian.org/~aurel32/qemu/mips/vmlinux-3.2.0-4-4kc-malta'
+
+ def setUp(self):
+ self.console_path = tempfile.mkstemp()[1]
+ kernel_path = cachedfile(self.kernel_url())
+ self.vm._args.extend(['-machine', 'malta'])
+ self.vm._args.extend(['-m', '64'])
+ self.vm._args.extend(['-kernel', kernel_path])
+ self.vm._args.extend(['-append', '"console=ttyS0 printk.time=0"'])
+ self.vm._args.extend(['-chardev', 'socket,id=uart0,server,nowait,path=' + self.console_path])
+ self.vm._args.extend(['-serial', 'chardev:uart0'])
+ self.vm._args.extend(['-nographic'])
+
+ def test_boot_console(self):
+ """
+ :avocado: tags=uart,printk
+ """
+ if self.params.get('arch') != self.ARCH:
+ return
+
+ self.vm.launch(self.console_path)
+ console = self.vm.get_console(console_address=self.console_path, login=False)
+ # no filesystem provided on purpose, wait for the Kernel panic
+ bootlog = console.read_until_any_line_matches(["Kernel panic - not syncing: VFS: Unable to mount root fs"], timeout=6.0)[1]
+ console.close()
+ # check Super I/O
+ self.assertIn(u'ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A', bootlog)
+ self.assertIn(u'ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A', bootlog)
+ self.assertIn(u'i8042 KBD port at 0x60,0x64 irq 1', bootlog)
+ self.assertIn(u'i8042 AUX port at 0x60,0x64 irq 12', bootlog)
+ # check PCI (network interface)
+ self.assertIn(u'registered as PCnet/PCI II 79C970A', bootlog)
+ self.vm.shutdown()
+
+ def tearDown(self):
+ os.remove(self.console_path)
diff --git a/tests/avocado/test_linux-boot-console.py.data/parameters.yaml b/tests/avocado/test_linux-boot-console.py.data/parameters.yaml
index ed8c08058c..156f271a73 100644
--- a/tests/avocado/test_linux-boot-console.py.data/parameters.yaml
+++ b/tests/avocado/test_linux-boot-console.py.data/parameters.yaml
@@ -1,3 +1,5 @@
architecture: !mux
alpha:
arch: alpha
+ mips:
+ arch: mips
--
2.17.0
next prev parent reply other threads:[~2018-04-19 16:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 16:46 [Qemu-devel] [RFC PATCH 0/7] avocado: Add acceptance tests parsing the Linux boot console Philippe Mathieu-Daudé
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 1/7] AVOCADO_QEMU: Snapshot commit Philippe Mathieu-Daudé
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 2/7] avocado: Update python scripts to upstream codebase Philippe Mathieu-Daudé
2018-05-01 0:56 ` Cleber Rosa
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 3/7] qemu.py: Check console arch is supported before calling mktemp() Philippe Mathieu-Daudé
2018-05-01 19:30 ` Cleber Rosa
2018-05-01 19:35 ` Cleber Rosa
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 4/7] qemu.py: Avoid deprecated tempfile.mktemp() Philippe Mathieu-Daudé
2018-05-01 19:33 ` Cleber Rosa
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 5/7] avocado: Add an optional flag 'login' to get_console() Philippe Mathieu-Daudé
2018-05-01 19:46 ` Cleber Rosa
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 6/7] avocado: Add a test parsing Linux kernel booting console Philippe Mathieu-Daudé
2018-04-19 19:38 ` Richard Henderson
2018-05-01 21:17 ` Cleber Rosa
2018-04-19 16:46 ` Philippe Mathieu-Daudé [this message]
2018-05-01 21:20 ` [Qemu-devel] [RFC PATCH 7/7] avocado: Add tests booting the Malta machine Cleber Rosa
2018-04-19 17:14 ` [Qemu-devel] [RFC PATCH 0/7] avocado: Add acceptance tests parsing the Linux boot console no-reply
2018-04-20 4:17 ` Philippe Mathieu-Daudé
2018-04-20 12:59 ` Philippe Mathieu-Daudé
2018-05-02 16:22 ` Cleber Rosa
2018-04-30 22:49 ` 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=20180419164642.9536-8-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=alex.bennee@linaro.org \
--cc=alistair23@gmail.com \
--cc=apahim@redhat.com \
--cc=aurelien@aurel32.net \
--cc=crosa@redhat.com \
--cc=famz@redhat.com \
--cc=ldoktor@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=xiang.zheng@linaro.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 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.