[PATCH 2/2] kunit: qemu_configs: Add or1k / openrisc configuration

1 view
Skip to first unread message

Thomas Weißschuh

unread,
Apr 27, 2026, 12:05:56 PM (4 days ago) Apr 27
to Nathan Chancellor, Nicolas Schier, Nick Desaulniers, Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar, linux-...@vger.kernel.org, ll...@lists.linux.dev, linux-...@vger.kernel.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com, Thomas Weißschuh
Add a basic configuration to run kunit tests on or1k / openrisc.

Signed-off-by: Thomas Weißschuh <li...@weissschuh.net>
---
tools/testing/kunit/qemu_configs/or1k.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/tools/testing/kunit/qemu_configs/or1k.py b/tools/testing/kunit/qemu_configs/or1k.py
new file mode 100644
index 000000000000..dfbbad0f9076
--- /dev/null
+++ b/tools/testing/kunit/qemu_configs/or1k.py
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0-only
+from ..qemu_config import QemuArchParams
+
+QEMU_ARCH = QemuArchParams(linux_arch='openrisc',
+ kconfig='''
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_SYSCON=y
+''',
+ qemu_arch='or1k',
+ kernel_path='vmlinux',
+ kernel_command_line='console=ttyS0',
+ extra_qemu_params=[
+ '-machine', 'virt',
+ '-m', '512',
+ ])

--
2.53.0

Thomas Weißschuh

unread,
Apr 27, 2026, 12:05:57 PM (4 days ago) Apr 27
to Nathan Chancellor, Nicolas Schier, Nick Desaulniers, Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar, linux-...@vger.kernel.org, ll...@lists.linux.dev, linux-...@vger.kernel.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com, Thomas Weißschuh
Add a basic configuration to run kunit tests on or1k / openrisc.

Signed-off-by: Thomas Weißschuh <li...@weissschuh.net>
---
Thomas Weißschuh (2):
gen_compile_commands: Ignore libgcc.a
kunit: qemu_configs: Add or1k / openrisc configuration

scripts/clang-tools/gen_compile_commands.py | 2 ++
tools/testing/kunit/qemu_configs/or1k.py | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260427-kunit-or1k-00035c13d70e

Best regards,
--
Thomas Weißschuh <li...@weissschuh.net>

David Gow

unread,
Apr 29, 2026, 6:11:08 AM (3 days ago) Apr 29
to Thomas Weißschuh, Nathan Chancellor, Nicolas Schier, Nick Desaulniers, Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar, linux-...@vger.kernel.org, ll...@lists.linux.dev, linux-...@vger.kernel.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com
Le 28/04/2026 à 12:04 AM, 'Thomas Weißschuh' via KUnit Development a écrit :
> Add a basic configuration to run kunit tests on or1k / openrisc.
>
> Signed-off-by: Thomas Weißschuh <li...@weissschuh.net>
> ---

Thanks very much. This works well here (assuming
CONFIG_KUNIT_FAULT_TESTS=n, and either a long timeout, or slow tests
skipped, as qemu-or1k is not fast on my machine).

Reviewed-by: David Gow <da...@davidgow.net>

Do we want to split the series and take this patch via kselftest/kunit,
and the generate_compile_commands one separately, or just pick both up
in the same tree?

Cheers,
-- David

Thomas Weißschuh

unread,
Apr 29, 2026, 7:14:47 AM (3 days ago) Apr 29
to David Gow, Nathan Chancellor, Nicolas Schier, Nick Desaulniers, Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar, linux-...@vger.kernel.org, ll...@lists.linux.dev, linux-...@vger.kernel.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com
On 2026-04-29 18:10:58+0800, David Gow wrote:
> Le 28/04/2026 à 12:04 AM, 'Thomas Weißschuh' via KUnit Development a écrit :
> > Add a basic configuration to run kunit tests on or1k / openrisc.
> >
> > Signed-off-by: Thomas Weißschuh <li...@weissschuh.net>
> > ---
>
> Thanks very much. This works well here (assuming CONFIG_KUNIT_FAULT_TESTS=n,
> and either a long timeout, or slow tests skipped, as qemu-or1k is not fast
> on my machine).
>
> Reviewed-by: David Gow <da...@davidgow.net>

Thanks!

> Do we want to split the series and take this patch via kselftest/kunit, and
> the generate_compile_commands one separately, or just pick both up in the
> same tree?

They should go through the same tree as otherwise kunit.py will fail to
build the or1k architecture, as it always tries to generate
compile_commands.json.

(...)

Nathan Chancellor

unread,
Apr 29, 2026, 2:31:02 PM (2 days ago) Apr 29
to Thomas Weißschuh, David Gow, Nathan Chancellor, Nicolas Schier, Nick Desaulniers, Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar, linux-...@vger.kernel.org, ll...@lists.linux.dev, linux-...@vger.kernel.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com
I don't anticipate any conflicts from the gen_compile_commands.py
change, so I think you can just take both through whatever tree you
prefer. I'll provide my Ack shortly.

Reply all
Reply to author
Forward
0 new messages