qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"Daniel P . Berrange" <berrange@redhat.com>
Subject: [PATCH 14/14] tests/functional: Convert the or1k-sim Avocado test
Date: Fri,  6 Sep 2024 20:05:49 +0200	[thread overview]
Message-ID: <20240906180549.792832-15-thuth@redhat.com> (raw)
In-Reply-To: <20240906180549.792832-1-thuth@redhat.com>

We've got to do_test_advcal_2018() here now that the test resides
in a separate file. Also switch back to the original URL (since
the site did not vanish as originally expected) and update the
hashsum to use SHA256.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/avocado/boot_linux_console.py |  8 --------
 tests/functional/meson.build        |  4 ++++
 tests/functional/test_or1k_sim.py   | 29 +++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 8 deletions(-)
 create mode 100755 tests/functional/test_or1k_sim.py

diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
index db72bd1b5e..6c50284986 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -927,14 +927,6 @@ def test_arm_ast2600_debian(self):
         self.wait_for_console_pattern("SMP: Total of 2 processors activated")
         self.wait_for_console_pattern("No filesystem could mount root")
 
-    def test_or1k_sim(self):
-        """
-        :avocado: tags=arch:or1k
-        :avocado: tags=machine:or1k-sim
-        """
-        tar_hash = '20334cdaf386108c530ff0badaecc955693027dd'
-        self.do_test_advcal_2018('20', tar_hash, 'vmlinux')
-
     def test_ppc64_e500(self):
         """
         :avocado: tags=arch:ppc64
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index 8f9694244f..68a7570119 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -94,6 +94,10 @@ tests_mips64el_system_thorough = [
   'mips64el_malta',
 ]
 
+tests_or1k_system_quick = [
+  'or1k_sim',
+]
+
 tests_ppc_system_quick = [
   'ppc_74xx',
 ]
diff --git a/tests/functional/test_or1k_sim.py b/tests/functional/test_or1k_sim.py
new file mode 100755
index 0000000000..aa2a1f08d2
--- /dev/null
+++ b/tests/functional/test_or1k_sim.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+#
+# Functional test that boots a Linux kernel on an OpenRISC-1000 SIM machine
+# and checks the console
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import os
+
+from qemu_test import LinuxKernelTest, Asset
+from qemu_test.utils import archive_extract
+
+class OpenRISC1kSimTest(LinuxKernelTest):
+
+    ASSET_DAY20 = Asset(
+        'https://www.qemu-advent-calendar.org/2018/download/day20.tar.xz',
+        'ff9d7dd7c6bdba325bd85ee85c02db61ff653e129558aeffe6aff55bffb6763a')
+
+    def test_or1k_sim(self):
+        self.set_machine('or1k-sim')
+        file_path = self.ASSET_DAY20.fetch()
+        archive_extract(file_path, self.workdir)
+        self.vm.set_console()
+        self.vm.add_args('-kernel', self.workdir + '/day20/vmlinux')
+        self.vm.launch()
+        self.wait_for_console_pattern('QEMU advent calendar')
+
+if __name__ == '__main__':
+    LinuxKernelTest.main()
-- 
2.46.0



  parent reply	other threads:[~2024-09-06 18:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 18:05 [PATCH 00/14] Convert Avocado tests based on LinuxKernelTest class Thomas Huth
2024-09-06 18:05 ` [PATCH 01/14] tests/functional: Add the LinuxKernelTest for testing the Linux boot process Thomas Huth
2024-09-07  4:43   ` Philippe Mathieu-Daudé
2024-09-06 18:05 ` [PATCH 02/14] tests/functional: Convert the m68k Q800 Avocado test into a functional test Thomas Huth
2024-09-07  4:36   ` Philippe Mathieu-Daudé
2024-09-06 18:05 ` [PATCH 03/14] tests/functional: Convert mips64el Fuloong2e avocado test (2/2) Thomas Huth
2024-09-06 18:05 ` [PATCH 04/14] tests/functional: Convert mips64el I6400 Malta avocado tests Thomas Huth
2024-09-06 18:05 ` [PATCH 05/14] tests/functional: Convert mips64el 5KEc " Thomas Huth
2024-09-06 18:05 ` [PATCH 06/14] tests/functional: Convert mips32el Malta YAMON avocado test Thomas Huth
2024-09-06 18:05 ` [PATCH 07/14] tests/functional: Convert nanomips Malta avocado tests Thomas Huth
2024-09-06 18:05 ` [PATCH 08/14] tests/functional: Convert mips32eb 4Kc " Thomas Huth
2024-09-06 18:05 ` [PATCH 09/14] tests/functional: Convert ARM Raspi2 " Thomas Huth
2024-09-06 18:05 ` [PATCH 10/14] tests/functional: Convert Aarch64 Raspi3 " Thomas Huth
2024-09-06 18:05 ` [PATCH 11/14] tests/functional: Convert Aarch64 Raspi4 " Thomas Huth
2024-09-06 18:05 ` [PATCH 12/14] tests/functional: Convert the Alpha Clipper Avocado test Thomas Huth
2024-09-07  4:30   ` Philippe Mathieu-Daudé
2024-09-06 18:05 ` [PATCH 13/14] tests/functional: Convert the m68k MCF5208EVB " Thomas Huth
2024-09-07  4:32   ` Philippe Mathieu-Daudé
2024-09-06 18:05 ` Thomas Huth [this message]
2024-09-07  4:37   ` [PATCH 14/14] tests/functional: Convert the or1k-sim " 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=20240906180549.792832-15-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=philmd@linaro.org \
    --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).