* [PATCH 0/2] kunit: qemu_configs: Add or1k / openrisc configuration
@ 2026-04-27 16:04 Thomas Weißschuh
2026-04-27 16:04 ` [PATCH 1/2] gen_compile_commands: Ignore libgcc.a Thomas Weißschuh
2026-04-27 16:04 ` [PATCH 2/2] kunit: qemu_configs: Add or1k / openrisc configuration Thomas Weißschuh
0 siblings, 2 replies; 7+ messages in thread
From: Thomas Weißschuh @ 2026-04-27 16:04 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier, Nick Desaulniers,
Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar
Cc: linux-kbuild, llvm, linux-kernel, linux-kselftest, kunit-dev,
Thomas Weißschuh
Add a basic configuration to run kunit tests on or1k / openrisc.
Signed-off-by: Thomas Weißschuh <linux@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 <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] gen_compile_commands: Ignore libgcc.a
2026-04-27 16:04 [PATCH 0/2] kunit: qemu_configs: Add or1k / openrisc configuration Thomas Weißschuh
@ 2026-04-27 16:04 ` Thomas Weißschuh
2026-04-29 18:32 ` Nathan Chancellor
2026-04-27 16:04 ` [PATCH 2/2] kunit: qemu_configs: Add or1k / openrisc configuration Thomas Weißschuh
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Weißschuh @ 2026-04-27 16:04 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier, Nick Desaulniers,
Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar
Cc: linux-kbuild, llvm, linux-kernel, linux-kselftest, kunit-dev,
Thomas Weißschuh
Some architectures link libgcc.a from the toolchain into the kernel.
gen_compile_commands trie to read the kbuild .cmd files of its
constituent object files, which are not available.
Flat out ignore libgcc.a, as it is not built as part of the kernel
anyways.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
scripts/clang-tools/gen_compile_commands.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
index 96e6e46ad1a7..8d14b81efd73 100755
--- a/scripts/clang-tools/gen_compile_commands.py
+++ b/scripts/clang-tools/gen_compile_commands.py
@@ -201,6 +201,8 @@ def main():
# Modules are listed in modules.order.
if os.path.isdir(path):
cmdfiles = cmdfiles_in_dir(path)
+ elif os.path.basename(path) == 'libgcc.a':
+ cmdfiles = []
elif path.endswith('.a'):
cmdfiles = cmdfiles_for_a(path, ar)
elif path.endswith('modules.order'):
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] kunit: qemu_configs: Add or1k / openrisc configuration
2026-04-27 16:04 [PATCH 0/2] kunit: qemu_configs: Add or1k / openrisc configuration Thomas Weißschuh
2026-04-27 16:04 ` [PATCH 1/2] gen_compile_commands: Ignore libgcc.a Thomas Weißschuh
@ 2026-04-27 16:04 ` Thomas Weißschuh
2026-04-29 10:10 ` David Gow
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Weißschuh @ 2026-04-27 16:04 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier, Nick Desaulniers,
Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar
Cc: linux-kbuild, llvm, linux-kernel, linux-kselftest, kunit-dev,
Thomas Weißschuh
Add a basic configuration to run kunit tests on or1k / openrisc.
Signed-off-by: Thomas Weißschuh <linux@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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] kunit: qemu_configs: Add or1k / openrisc configuration
2026-04-27 16:04 ` [PATCH 2/2] kunit: qemu_configs: Add or1k / openrisc configuration Thomas Weißschuh
@ 2026-04-29 10:10 ` David Gow
2026-04-29 11:14 ` Thomas Weißschuh
0 siblings, 1 reply; 7+ messages in thread
From: David Gow @ 2026-04-29 10:10 UTC (permalink / raw)
To: Thomas Weißschuh, Nathan Chancellor, Nicolas Schier,
Nick Desaulniers, Bill Wendling, Justin Stitt, Brendan Higgins,
David Gow, Rae Moar
Cc: linux-kbuild, llvm, linux-kernel, linux-kselftest, kunit-dev
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 <linux@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 <david@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
> 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',
> + ])
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] kunit: qemu_configs: Add or1k / openrisc configuration
2026-04-29 10:10 ` David Gow
@ 2026-04-29 11:14 ` Thomas Weißschuh
2026-04-29 18:30 ` Nathan Chancellor
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Weißschuh @ 2026-04-29 11:14 UTC (permalink / raw)
To: David Gow
Cc: Nathan Chancellor, Nicolas Schier, Nick Desaulniers,
Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar,
linux-kbuild, llvm, linux-kernel, linux-kselftest, kunit-dev
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 <linux@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 <david@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.
(...)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] kunit: qemu_configs: Add or1k / openrisc configuration
2026-04-29 11:14 ` Thomas Weißschuh
@ 2026-04-29 18:30 ` Nathan Chancellor
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Chancellor @ 2026-04-29 18:30 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: David Gow, Nathan Chancellor, Nicolas Schier, Nick Desaulniers,
Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar,
linux-kbuild, llvm, linux-kernel, linux-kselftest, kunit-dev
On 2026-04-29 13:14:42+02:00, Thomas Weißschuh wrote:
> On 2026-04-29 18:10:58+0800, David Gow wrote:
> > 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.
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] gen_compile_commands: Ignore libgcc.a
2026-04-27 16:04 ` [PATCH 1/2] gen_compile_commands: Ignore libgcc.a Thomas Weißschuh
@ 2026-04-29 18:32 ` Nathan Chancellor
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Chancellor @ 2026-04-29 18:32 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Nathan Chancellor, Nicolas Schier, Nick Desaulniers,
Bill Wendling, Justin Stitt, Brendan Higgins, David Gow, Rae Moar,
linux-kbuild, llvm, linux-kernel, linux-kselftest, kunit-dev
On Mon, 27 Apr 2026 18:04:56 +0200, Thomas Weißschuh <linux@weissschuh.net> wrote:
> Some architectures link libgcc.a from the toolchain into the kernel.
> gen_compile_commands trie to read the kbuild .cmd files of its
> constituent object files, which are not available.
>
> Flat out ignore libgcc.a, as it is not built as part of the kernel
> anyways.
>
> [...]
Acked-by: Nathan Chancellor <nathan@kernel.org>
--
Cheers,
Nathan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-04-29 18:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 16:04 [PATCH 0/2] kunit: qemu_configs: Add or1k / openrisc configuration Thomas Weißschuh
2026-04-27 16:04 ` [PATCH 1/2] gen_compile_commands: Ignore libgcc.a Thomas Weißschuh
2026-04-29 18:32 ` Nathan Chancellor
2026-04-27 16:04 ` [PATCH 2/2] kunit: qemu_configs: Add or1k / openrisc configuration Thomas Weißschuh
2026-04-29 10:10 ` David Gow
2026-04-29 11:14 ` Thomas Weißschuh
2026-04-29 18:30 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox