* [PATCH v6 06/14] make-mod-scripts: split `HOSTCC` flag to align with to linux-yocto
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
@ 2026-02-12 18:10 ` Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 07/14] kernel: Disable ccache when kernel rust support is enabled Harish.Sadineni
` (7 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Harish.Sadineni @ 2026-02-12 18:10 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
From: Harish Sadineni <Harish.Sadineni@windriver.com>
when compiling rust-out-of-tree module recipe 'make-mod-scripts' failing
with the following error:
HOSTRUSTC scripts/generate_rust_target
error: Unrecognized option: 'i'
This issue occurs because CFLAGS are being passed to HOSTRUSTC.
Updated the flags in the make-mod-scripts recipe to align with
the flags used by linux-yocto.
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
index 8fcb5e6eb3..874e16e642 100644
--- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
+++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -18,7 +18,7 @@ DEV_PKG_DEPENDENCY = ""
DEPENDS += "bc-native bison-native"
DEPENDS += "gmp-native"
-EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
+EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
KERNEL_LOCALVERSION = "${@get_kernellocalversion_file("${STAGING_KERNEL_BUILDDIR}")}"
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH v6 07/14] kernel: Disable ccache when kernel rust support is enabled
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 06/14] make-mod-scripts: split `HOSTCC` flag to align with to linux-yocto Harish.Sadineni
@ 2026-02-12 18:10 ` Harish.Sadineni
2026-02-26 22:59 ` [OE-core] " Yoann Congal
2026-02-12 18:10 ` [PATCH v6 08/14] kernel-devsrc: copying rust-kernel source to $kerneldir/build Harish.Sadineni
` (6 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Harish.Sadineni @ 2026-02-12 18:10 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
From: Harish Sadineni <Harish.Sadineni@windriver.com>
Currently, a ccache enabled build fails with:
| HOSTRUSTC scripts/generate_rust_target
| HOSTCC scripts/kallsyms
| HOSTCC scripts/sorttable
| HOSTCC scripts/asn1_compiler
| TOUCH include/generated/gcc-plugins.h
| DESCEND objtool
| error: multiple input filenames provided (first two filenames are gcc and
.../tmp/work-shared/qemux86-64/kernel-source/scripts/generate_rust_target.rs)
Linux rust build infrastructure does not currently support ccache (Opened bug[0]).
Quick summary: There are 2 issues: $HOSTCC is not escaped and rustc
expect a path (and not a command)
Disable ccache if KERNEL_RUST_SUPPORT is 'True' for kernel and kernel module builds, including
auxiliary tooling such as make-mod-scripts.
More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
[0]: https://github.com/Rust-for-Linux/linux/issues/1224
Co-developed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr>
Cc: Alban MOIZAN <alban.moizan@smile.fr>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
meta/classes-recipe/kernel-yocto-rust.bbclass | 7 +++++++
.../make-mod-scripts/make-mod-scripts_1.0.bb | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/meta/classes-recipe/kernel-yocto-rust.bbclass b/meta/classes-recipe/kernel-yocto-rust.bbclass
index fd9ee91c79..608ccc4609 100644
--- a/meta/classes-recipe/kernel-yocto-rust.bbclass
+++ b/meta/classes-recipe/kernel-yocto-rust.bbclass
@@ -16,3 +16,10 @@ do_kernel_configme[depends] += "${RUST_KERNEL_TASK_DEPENDS}"
do_kernel_configme:append () {
oe_runmake -C ${S} O=${B} rustavailable
}
+
+# Linux rust build infrastructure does not currently support ccache
+# see https://github.com/Rust-for-Linux/linux/issues/1224
+# Quick summary: There are 2 issues: $HOSTCC is not escaped and rustc expect a path (and not a command)
+# More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
+# Disable ccache for kernel build if kernel rust support is enabled to workaround this.
+CCACHE_DISABLE ?= "1"
diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
index 874e16e642..6226382001 100644
--- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
+++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -36,3 +36,10 @@ do_configure() {
-C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} $t
done
}
+
+# Linux rust build infrastructure does not currently support ccache
+# see https://github.com/Rust-for-Linux/linux/issues/1224
+# Quick summary: There are 2 issues: $HOSTCC is not escaped and rustc expect a path (and not a command)
+# More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
+# Disable ccache for kernel build if kernel rust support is enabled to workaround this
+CCACHE_DISABLE ?= "${@bb.utils.contains('KERNEL_RUST_SUPPORT', 'True', '1', '0', d)}"
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [OE-core] [PATCH v6 07/14] kernel: Disable ccache when kernel rust support is enabled
2026-02-12 18:10 ` [PATCH v6 07/14] kernel: Disable ccache when kernel rust support is enabled Harish.Sadineni
@ 2026-02-26 22:59 ` Yoann Congal
0 siblings, 0 replies; 20+ messages in thread
From: Yoann Congal @ 2026-02-26 22:59 UTC (permalink / raw)
To: Harish.Sadineni, openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
elmehdi.younes
On Thu Feb 12, 2026 at 7:10 PM CET, Harish via lists.openembedded.org Sadineni wrote:
> From: Harish Sadineni <Harish.Sadineni@windriver.com>
>
> Currently, a ccache enabled build fails with:
> | HOSTRUSTC scripts/generate_rust_target
> | HOSTCC scripts/kallsyms
> | HOSTCC scripts/sorttable
> | HOSTCC scripts/asn1_compiler
> | TOUCH include/generated/gcc-plugins.h
> | DESCEND objtool
> | error: multiple input filenames provided (first two filenames are gcc and
> .../tmp/work-shared/qemux86-64/kernel-source/scripts/generate_rust_target.rs)
>
> Linux rust build infrastructure does not currently support ccache (Opened bug[0]).
>
> Quick summary: There are 2 issues: $HOSTCC is not escaped and rustc
> expect a path (and not a command)
>
> Disable ccache if KERNEL_RUST_SUPPORT is 'True' for kernel and kernel module builds, including
> auxiliary tooling such as make-mod-scripts.
>
> More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
>
> [0]: https://github.com/Rust-for-Linux/linux/issues/1224
FYI, a patch has been submitted for this:
https://lore.kernel.org/rust-for-linux/20260225102819.16553-1-mo@sdhn.cc/
(It has a negative review though...)
> Co-developed-by: Yoann Congal <yoann.congal@smile.fr>
> Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr>
> Cc: Alban MOIZAN <alban.moizan@smile.fr>
> Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
> Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
> ---
> meta/classes-recipe/kernel-yocto-rust.bbclass | 7 +++++++
> .../make-mod-scripts/make-mod-scripts_1.0.bb | 7 +++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/meta/classes-recipe/kernel-yocto-rust.bbclass b/meta/classes-recipe/kernel-yocto-rust.bbclass
> index fd9ee91c79..608ccc4609 100644
> --- a/meta/classes-recipe/kernel-yocto-rust.bbclass
> +++ b/meta/classes-recipe/kernel-yocto-rust.bbclass
> @@ -16,3 +16,10 @@ do_kernel_configme[depends] += "${RUST_KERNEL_TASK_DEPENDS}"
> do_kernel_configme:append () {
> oe_runmake -C ${S} O=${B} rustavailable
> }
> +
> +# Linux rust build infrastructure does not currently support ccache
> +# see https://github.com/Rust-for-Linux/linux/issues/1224
> +# Quick summary: There are 2 issues: $HOSTCC is not escaped and rustc expect a path (and not a command)
> +# More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
> +# Disable ccache for kernel build if kernel rust support is enabled to workaround this.
> +CCACHE_DISABLE ?= "1"
> diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> index 874e16e642..6226382001 100644
> --- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> +++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
> @@ -36,3 +36,10 @@ do_configure() {
> -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} $t
> done
> }
> +
> +# Linux rust build infrastructure does not currently support ccache
> +# see https://github.com/Rust-for-Linux/linux/issues/1224
> +# Quick summary: There are 2 issues: $HOSTCC is not escaped and rustc expect a path (and not a command)
> +# More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
> +# Disable ccache for kernel build if kernel rust support is enabled to workaround this
> +CCACHE_DISABLE ?= "${@bb.utils.contains('KERNEL_RUST_SUPPORT', 'True', '1', '0', d)}"
--
Yoann Congal
Smile ECS
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v6 08/14] kernel-devsrc: copying rust-kernel source to $kerneldir/build
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 06/14] make-mod-scripts: split `HOSTCC` flag to align with to linux-yocto Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 07/14] kernel: Disable ccache when kernel rust support is enabled Harish.Sadineni
@ 2026-02-12 18:10 ` Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample Harish.Sadineni
` (5 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Harish.Sadineni @ 2026-02-12 18:10 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
From: Harish Sadineni <Harish.Sadineni@windriver.com>
When CONFIG_RUST is enabled, running 'make prepare' in the target & SDK
fails because the Rust kernel infrastructure is incomplete in the staged
kernel sources.
The Rust build system requires a wider set of interdependent sources
during make prepare, including bindgen inputs, C helper sources,
generated headers, and other support files. These are all located under
the kernel rust/ directory.
To ensure make prepare succeeds and to support building Rust-based
kernel modules from the target & SDK, copy the full rust/ directory
(of size 2.5MB) into $kerneldir/build when the rust-kernel distro feature
is enabled.
Additionally, when Rust support is enabled, 'make prepare' generates
.rmeta files (crate metadata in a custom binary format) and shared
objects (.so) that are required for compiling Rust kernel modules.
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
meta/recipes-kernel/linux/kernel-devsrc.bb | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 23a9093ede..d9b09a3d9a 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -140,6 +140,15 @@ do_install() {
cp -a scripts $kerneldir/build
+ # In sdk, when CONFIG_RUST is enabled, `make prepare` requires the full Rust
+ # kernel infrastructure. The Rust build system pulls in bindgen inputs, C helpers,
+ # generated headers, and generate crate metadata (.rmeta), and shared objects
+ # needed for building Rust kernel modules. Copy the entire rust/ directory (of size 2.5MB)
+ # to avoid failures with 'make prepare'.
+ if ${@bb.utils.contains('KERNEL_RUST_SUPPORT', 'True', 'true', 'false', d)}; then
+ cp -a rust ${kerneldir}/build
+ fi
+
# for v6.1+ (otherwise we are missing multiple default targets)
cp -a --parents Kbuild $kerneldir/build 2>/dev/null || :
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
` (2 preceding siblings ...)
2026-02-12 18:10 ` [PATCH v6 08/14] kernel-devsrc: copying rust-kernel source to $kerneldir/build Harish.Sadineni
@ 2026-02-12 18:10 ` Harish.Sadineni
2026-02-15 13:40 ` [OE-core] " Mathieu Dubois-Briand
2026-02-12 18:10 ` [PATCH v6 10/14] kernel.bbclass: Copy include/config/auto.conf in STAGING_KERNEL_BUILDDIR Harish.Sadineni
` (4 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Harish.Sadineni @ 2026-02-12 18:10 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
From: Yoann Congal <yoann.congal@smile.fr>
This new case tests that the rust_mininal sample inside the kernel source
tree is buildable and works properly: check that the module can be
loaded and that it prints correctly.
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
meta/lib/oeqa/selftest/cases/runtime_test.py | 23 ++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index d58ffa80f5..fe9783e81d 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -481,3 +481,26 @@ IMAGE_INSTALL:append = " systemtap-runtime"
cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_pid.stp" % systemtap_examples
result = runCmd(cmd)
self.assertEqual(0, result.status, 'crosstap syscalls_by_pid returned a non 0 status:%s' % result.output)
+@OETestTag("runqemu")
+class RustKernel(OESelftestTestCase):
+ @classmethod
+ def setUpClass(cls):
+ super(RustKernel, cls).setUpClass()
+ cls.image = "core-image-minimal"
+
+ def test_kernel_rust_sample(self):
+ import textwrap
+ self.write_config(textwrap.dedent("""
+ KERNEL_RUST_SUPPORT = 'True'
+ KERNEL_EXTRA_FEATURES:append = ' features/kernel-sample/kernel-rust-sample.scc'
+ CORE_IMAGE_EXTRA_INSTALL += "kernel-module-rust-minimal"
+ """))
+ bitbake(self.image)
+
+ with runqemu(self.image, runqemuparams = "nographic") as qemu:
+ qemu.run_serial("dmesg -c > /dev/null")
+ status, _ = qemu.run_serial("modprobe rust_minimal")
+ self.assertEqual(status, 1, "Loading rust_minimal module failed!")
+ _, output = qemu.run_serial("dmesg")
+ self.logger.debug(f"rust_minimal dmesg output:\n" + textwrap.indent(output, " "))
+ self.assertIn("Rust minimal sample", output, "Kernel Rust sample expected output not found in dmesg")
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [OE-core] [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-12 18:10 ` [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample Harish.Sadineni
@ 2026-02-15 13:40 ` Mathieu Dubois-Briand
2026-02-15 17:01 ` Yoann Congal
0 siblings, 1 reply; 20+ messages in thread
From: Mathieu Dubois-Briand @ 2026-02-15 13:40 UTC (permalink / raw)
To: Harish.Sadineni, openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
On Thu Feb 12, 2026 at 7:10 PM CET, Harish via lists.openembedded.org Sadineni wrote:
> From: Yoann Congal <yoann.congal@smile.fr>
>
> This new case tests that the rust_mininal sample inside the kernel source
> tree is buildable and works properly: check that the module can be
> loaded and that it prints correctly.
>
> Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
> Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
> ---
Hi Harish, Yoann,
It looks like this test is still a bit intermittent:
2026-02-15 09:27:44,140 - oe-selftest - INFO - runtime_test.RustKernel.test_kernel_rust_sample (subunit.RemotedTestCase)
2026-02-15 09:27:44,142 - oe-selftest - INFO - ... FAIL
...
2026-02-15 09:27:44,142 - oe-selftest - INFO - 11: 13/57 404/671 (87.99s) (0 failed) (runtime_test.RustKernel.test_kernel_rust_sample)
2026-02-15 09:27:44,142 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/runtime_test.py", line 506, in test_kernel_rust_sample
self.assertEqual(status, 1, "Loading rust_minimal module failed!")
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/unittest/case.py", line 907, in assertEqual
assertion_func(first, second, msg=msg)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/unittest/case.py", line 900, in _baseAssertEqual
raise self.failureException(msg)
AssertionError: 0 != 1 : Loading rust_minimal module failed!
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [OE-core] [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-15 13:40 ` [OE-core] " Mathieu Dubois-Briand
@ 2026-02-15 17:01 ` Yoann Congal
2026-02-16 13:09 ` Harish Sadineni
0 siblings, 1 reply; 20+ messages in thread
From: Yoann Congal @ 2026-02-15 17:01 UTC (permalink / raw)
To: Mathieu Dubois-Briand, Harish.Sadineni, openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
elmehdi.younes
On Sun Feb 15, 2026 at 2:40 PM CET, Mathieu Dubois-Briand wrote:
> On Thu Feb 12, 2026 at 7:10 PM CET, Harish via lists.openembedded.org Sadineni wrote:
>> From: Yoann Congal <yoann.congal@smile.fr>
>>
>> This new case tests that the rust_mininal sample inside the kernel source
>> tree is buildable and works properly: check that the module can be
>> loaded and that it prints correctly.
>>
>> Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
>> Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
>> ---
>
> Hi Harish, Yoann,
>
> It looks like this test is still a bit intermittent:
>
> 2026-02-15 09:27:44,140 - oe-selftest - INFO - runtime_test.RustKernel.test_kernel_rust_sample (subunit.RemotedTestCase)
> 2026-02-15 09:27:44,142 - oe-selftest - INFO - ... FAIL
> ...
> 2026-02-15 09:27:44,142 - oe-selftest - INFO - 11: 13/57 404/671 (87.99s) (0 failed) (runtime_test.RustKernel.test_kernel_rust_sample)
> 2026-02-15 09:27:44,142 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
> File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/runtime_test.py", line 506, in test_kernel_rust_sample
> self.assertEqual(status, 1, "Loading rust_minimal module failed!")
> ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.13/unittest/case.py", line 907, in assertEqual
> assertion_func(first, second, msg=msg)
> ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.13/unittest/case.py", line 900, in _baseAssertEqual
> raise self.failureException(msg)
> AssertionError: 0 != 1 : Loading rust_minimal module failed!
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319
This is oe-selftest-armhost on ubuntu2504-vk-arm1.
Harish, do you have access to an ARM host to reproduce/debug this?
(I have looked but the builddir for this particular run was already deleted)
--
Yoann Congal
Smile ECS
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [OE-core] [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-15 17:01 ` Yoann Congal
@ 2026-02-16 13:09 ` Harish Sadineni
2026-02-16 15:48 ` Mathieu Dubois-Briand
0 siblings, 1 reply; 20+ messages in thread
From: Harish Sadineni @ 2026-02-16 13:09 UTC (permalink / raw)
To: Yoann Congal, Mathieu Dubois-Briand, openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
elmehdi.younes
[-- Attachment #1: Type: text/plain, Size: 3573 bytes --]
On 2/15/2026 10:31 PM, Yoann Congal wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Sun Feb 15, 2026 at 2:40 PM CET, Mathieu Dubois-Briand wrote:
>> On Thu Feb 12, 2026 at 7:10 PM CET, Harish via lists.openembedded.org Sadineni wrote:
>>> From: Yoann Congal<yoann.congal@smile.fr>
>>>
>>> This new case tests that the rust_mininal sample inside the kernel source
>>> tree is buildable and works properly: check that the module can be
>>> loaded and that it prints correctly.
>>>
>>> Signed-off-by: Yoann Congal<yoann.congal@smile.fr>
>>> Signed-off-by: Harish Sadineni<Harish.Sadineni@windriver.com>
>>> ---
>> Hi Harish, Yoann,
>>
>> It looks like this test is still a bit intermittent:
>>
>> 2026-02-15 09:27:44,140 - oe-selftest - INFO - runtime_test.RustKernel.test_kernel_rust_sample (subunit.RemotedTestCase)
>> 2026-02-15 09:27:44,142 - oe-selftest - INFO - ... FAIL
>> ...
>> 2026-02-15 09:27:44,142 - oe-selftest - INFO - 11: 13/57 404/671 (87.99s) (0 failed) (runtime_test.RustKernel.test_kernel_rust_sample)
>> 2026-02-15 09:27:44,142 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
>> File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/runtime_test.py", line 506, in test_kernel_rust_sample
>> self.assertEqual(status, 1, "Loading rust_minimal module failed!")
>> ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> File "/usr/lib/python3.13/unittest/case.py", line 907, in assertEqual
>> assertion_func(first, second, msg=msg)
>> ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
>> File "/usr/lib/python3.13/unittest/case.py", line 900, in _baseAssertEqual
>> raise self.failureException(msg)
>> AssertionError: 0 != 1 : Loading rust_minimal module failed!
>>
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319
> This is oe-selftest-armhost on ubuntu2504-vk-arm1.
Hi Yoann, Mathieu,
I tried few builds locally, but not able to reproduce this.
On the autobuilder, We ran following builds which were completed
successfully on ubuntu2504-vk-arm1:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3326
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3331
Additionally, One of Mathieu's build also ran successfully on
oe-selftest-armhost ubuntu2504-vk-arm1:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323
<https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323>
From what I can see, build 3319
<https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319>was
triggered from a-full/3219
<https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/3219>:
However, when checking a-full/3219, it triggered build 3317
<https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3317>,
where the rust kernel selftest passed.
I can see few other builds were successful on oe-selftest-armhost with
this patch series. I’m not sure why the failure occurred in this case.
Mathieu, could you please try running a few additional builds to see if
it reproduces?
Thanks,
Harish
>
> Harish, do you have access to an ARM host to reproduce/debug this?
> (I have looked but the builddir for this particular run was already deleted)
>
> --
> Yoann Congal
> Smile ECS
>
[-- Attachment #2: Type: text/html, Size: 5133 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [OE-core] [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-16 13:09 ` Harish Sadineni
@ 2026-02-16 15:48 ` Mathieu Dubois-Briand
2026-02-17 17:01 ` Mathieu Dubois-Briand
0 siblings, 1 reply; 20+ messages in thread
From: Mathieu Dubois-Briand @ 2026-02-16 15:48 UTC (permalink / raw)
To: Harish Sadineni, Yoann Congal, openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
elmehdi.younes
On Mon Feb 16, 2026 at 2:09 PM CET, Harish Sadineni wrote:
>
> On 2/15/2026 10:31 PM, Yoann Congal wrote:
>> CAUTION: This email comes from a non Wind River email account!
>> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On Sun Feb 15, 2026 at 2:40 PM CET, Mathieu Dubois-Briand wrote:
>>> On Thu Feb 12, 2026 at 7:10 PM CET, Harish via lists.openembedded.org Sadineni wrote:
>>>> From: Yoann Congal<yoann.congal@smile.fr>
>>>>
>>>> This new case tests that the rust_mininal sample inside the kernel source
>>>> tree is buildable and works properly: check that the module can be
>>>> loaded and that it prints correctly.
>>>>
>>>> Signed-off-by: Yoann Congal<yoann.congal@smile.fr>
>>>> Signed-off-by: Harish Sadineni<Harish.Sadineni@windriver.com>
>>>> ---
>>> Hi Harish, Yoann,
>>>
>>> It looks like this test is still a bit intermittent:
>>>
>>> 2026-02-15 09:27:44,140 - oe-selftest - INFO - runtime_test.RustKernel.test_kernel_rust_sample (subunit.RemotedTestCase)
>>> 2026-02-15 09:27:44,142 - oe-selftest - INFO - ... FAIL
>>> ...
>>> 2026-02-15 09:27:44,142 - oe-selftest - INFO - 11: 13/57 404/671 (87.99s) (0 failed) (runtime_test.RustKernel.test_kernel_rust_sample)
>>> 2026-02-15 09:27:44,142 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
>>> File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/runtime_test.py", line 506, in test_kernel_rust_sample
>>> self.assertEqual(status, 1, "Loading rust_minimal module failed!")
>>> ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> File "/usr/lib/python3.13/unittest/case.py", line 907, in assertEqual
>>> assertion_func(first, second, msg=msg)
>>> ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
>>> File "/usr/lib/python3.13/unittest/case.py", line 900, in _baseAssertEqual
>>> raise self.failureException(msg)
>>> AssertionError: 0 != 1 : Loading rust_minimal module failed!
>>>
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319
>> This is oe-selftest-armhost on ubuntu2504-vk-arm1.
> Hi Yoann, Mathieu,
>
> I tried few builds locally, but not able to reproduce this.
>
> On the autobuilder, We ran following builds which were completed
> successfully on ubuntu2504-vk-arm1:
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3326
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3331
>
> Additionally, One of Mathieu's build also ran successfully on
> oe-selftest-armhost ubuntu2504-vk-arm1:
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323
> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323>
> From what I can see, build 3319
> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319>was
> triggered from a-full/3219
> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/3219>:
> However, when checking a-full/3219, it triggered build 3317
> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3317>,
> where the rust kernel selftest passed.
>
> I can see few other builds were successful on oe-selftest-armhost with
> this patch series. I’m not sure why the failure occurred in this case.
> Mathieu, could you please try running a few additional builds to see if
> it reproduces?
>
> Thanks,
> Harish
Sure, I will launch a few builds and see how it goes.
AB maintenance will begin soon, so I will start either later today or
tomorrow morning.
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [OE-core] [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-16 15:48 ` Mathieu Dubois-Briand
@ 2026-02-17 17:01 ` Mathieu Dubois-Briand
2026-02-23 7:21 ` Mathieu Dubois-Briand
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: Mathieu Dubois-Briand @ 2026-02-17 17:01 UTC (permalink / raw)
To: Harish Sadineni, Yoann Congal, openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
elmehdi.younes
On Mon Feb 16, 2026 at 4:48 PM CET, Mathieu Dubois-Briand wrote:
> On Mon Feb 16, 2026 at 2:09 PM CET, Harish Sadineni wrote:
>> Hi Yoann, Mathieu,
>>
>> I tried few builds locally, but not able to reproduce this.
>>
>> On the autobuilder, We ran following builds which were completed
>> successfully on ubuntu2504-vk-arm1:
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3326
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3331
>>
>> Additionally, One of Mathieu's build also ran successfully on
>> oe-selftest-armhost ubuntu2504-vk-arm1:
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323
>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323>
>> From what I can see, build 3319
>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319>was
>> triggered from a-full/3219
>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/3219>:
>> However, when checking a-full/3219, it triggered build 3317
>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3317>,
>> where the rust kernel selftest passed.
>>
>> I can see few other builds were successful on oe-selftest-armhost with
>> this patch series. I’m not sure why the failure occurred in this case.
>> Mathieu, could you please try running a few additional builds to see if
>> it reproduces?
>>
>> Thanks,
>> Harish
>
> Sure, I will launch a few builds and see how it goes.
>
> AB maintenance will begin soon, so I will start either later today or
> tomorrow morning.
I believe I got one:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3346
I backed up the build folder, it should stay there until next Monday.
(/srv/pokybuild/yocto-worker/oe-selftest-armhost-3346-mathieu-2026-02-17
on ubuntu2404-vk-arm1)
Please tell me if you need me to extract any build artifact.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [OE-core] [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-17 17:01 ` Mathieu Dubois-Briand
@ 2026-02-23 7:21 ` Mathieu Dubois-Briand
2026-02-23 11:19 ` Sundeep KOKKONDA
2026-02-27 13:33 ` Harish Sadineni
2026-03-04 12:39 ` Harish Sadineni
2 siblings, 1 reply; 20+ messages in thread
From: Mathieu Dubois-Briand @ 2026-02-23 7:21 UTC (permalink / raw)
To: Harish Sadineni, Yoann Congal, openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
elmehdi.younes
On Tue Feb 17, 2026 at 6:01 PM CET, Mathieu Dubois-Briand wrote:
> On Mon Feb 16, 2026 at 4:48 PM CET, Mathieu Dubois-Briand wrote:
>> On Mon Feb 16, 2026 at 2:09 PM CET, Harish Sadineni wrote:
>>> Hi Yoann, Mathieu,
>>>
>>> I tried few builds locally, but not able to reproduce this.
>>>
>>> On the autobuilder, We ran following builds which were completed
>>> successfully on ubuntu2504-vk-arm1:
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3326
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3331
>>>
>>> Additionally, One of Mathieu's build also ran successfully on
>>> oe-selftest-armhost ubuntu2504-vk-arm1:
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323>
>>> From what I can see, build 3319
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319>was
>>> triggered from a-full/3219
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/3219>:
>>> However, when checking a-full/3219, it triggered build 3317
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3317>,
>>> where the rust kernel selftest passed.
>>>
>>> I can see few other builds were successful on oe-selftest-armhost with
>>> this patch series. I’m not sure why the failure occurred in this case.
>>> Mathieu, could you please try running a few additional builds to see if
>>> it reproduces?
>>>
>>> Thanks,
>>> Harish
>>
>> Sure, I will launch a few builds and see how it goes.
>>
>> AB maintenance will begin soon, so I will start either later today or
>> tomorrow morning.
>
> I believe I got one:
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3346
>
> I backed up the build folder, it should stay there until next Monday.
> (/srv/pokybuild/yocto-worker/oe-selftest-armhost-3346-mathieu-2026-02-17
> on ubuntu2404-vk-arm1)
>
> Please tell me if you need me to extract any build artifact.
>
Hi Harish,
Do you need any file from this build before it is removed?
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [OE-core] [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-23 7:21 ` Mathieu Dubois-Briand
@ 2026-02-23 11:19 ` Sundeep KOKKONDA
0 siblings, 0 replies; 20+ messages in thread
From: Sundeep KOKKONDA @ 2026-02-23 11:19 UTC (permalink / raw)
To: Mathieu Dubois-Briand, Harish Sadineni, Yoann Congal,
openembedded-core
Cc: Randy.MacLeod, bruce.ashfield, paul, elmehdi.younes
On 23-Feb-26 12:51, Mathieu Dubois-Briand wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Tue Feb 17, 2026 at 6:01 PM CET, Mathieu Dubois-Briand wrote:
>> On Mon Feb 16, 2026 at 4:48 PM CET, Mathieu Dubois-Briand wrote:
>>> On Mon Feb 16, 2026 at 2:09 PM CET, Harish Sadineni wrote:
>>>> Hi Yoann, Mathieu,
>>>>
>>>> I tried few builds locally, but not able to reproduce this.
>>>>
>>>> On the autobuilder, We ran following builds which were completed
>>>> successfully on ubuntu2504-vk-arm1:
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3326
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3331
>>>>
>>>> Additionally, One of Mathieu's build also ran successfully on
>>>> oe-selftest-armhost ubuntu2504-vk-arm1:
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323
>>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323>
>>>> From what I can see, build 3319
>>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319>was
>>>> triggered from a-full/3219
>>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/3219>:
>>>> However, when checking a-full/3219, it triggered build 3317
>>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3317>,
>>>> where the rust kernel selftest passed.
>>>>
>>>> I can see few other builds were successful on oe-selftest-armhost with
>>>> this patch series. I’m not sure why the failure occurred in this case.
>>>> Mathieu, could you please try running a few additional builds to see if
>>>> it reproduces?
>>>>
>>>> Thanks,
>>>> Harish
>>> Sure, I will launch a few builds and see how it goes.
>>>
>>> AB maintenance will begin soon, so I will start either later today or
>>> tomorrow morning.
>> I believe I got one:
>>
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3346
>>
>> I backed up the build folder, it should stay there until next Monday.
>> (/srv/pokybuild/yocto-worker/oe-selftest-armhost-3346-mathieu-2026-02-17
>> on ubuntu2404-vk-arm1)
>>
>> Please tell me if you need me to extract any build artifact.
>>
> Hi Harish,
>
> Do you need any file from this build before it is removed?
Hello Mathieu,
I copied the build logs and we will be looking into the failures.
Thanks,
Sundeep K.
>
> Thanks,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [OE-core] [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-17 17:01 ` Mathieu Dubois-Briand
2026-02-23 7:21 ` Mathieu Dubois-Briand
@ 2026-02-27 13:33 ` Harish Sadineni
2026-03-04 12:39 ` Harish Sadineni
2 siblings, 0 replies; 20+ messages in thread
From: Harish Sadineni @ 2026-02-27 13:33 UTC (permalink / raw)
To: Mathieu Dubois-Briand, openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
elmehdi.younes, Yoann Congal
On 2/17/2026 10:31 PM, Mathieu Dubois-Briand wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Mon Feb 16, 2026 at 4:48 PM CET, Mathieu Dubois-Briand wrote:
>> On Mon Feb 16, 2026 at 2:09 PM CET, Harish Sadineni wrote:
>>> Hi Yoann, Mathieu,
>>>
>>> I tried few builds locally, but not able to reproduce this.
>>>
>>> On the autobuilder, We ran following builds which were completed
>>> successfully on ubuntu2504-vk-arm1:
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3326
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3331
>>>
>>> Additionally, One of Mathieu's build also ran successfully on
>>> oe-selftest-armhost ubuntu2504-vk-arm1:
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323>
>>> From what I can see, build 3319
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319>was
>>> triggered from a-full/3219
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/3219>:
>>> However, when checking a-full/3219, it triggered build 3317
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3317>,
>>> where the rust kernel selftest passed.
>>>
>>> I can see few other builds were successful on oe-selftest-armhost with
>>> this patch series. I’m not sure why the failure occurred in this case.
>>> Mathieu, could you please try running a few additional builds to see if
>>> it reproduces?
>>>
>>> Thanks,
>>> Harish
>> Sure, I will launch a few builds and see how it goes.
>>
>> AB maintenance will begin soon, so I will start either later today or
>> tomorrow morning.
> I believe I got one:
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3346
>
> I backed up the build folder, it should stay there until next Monday.
> (/srv/pokybuild/yocto-worker/oe-selftest-armhost-3346-mathieu-2026-02-17
> on ubuntu2404-vk-arm1)
Hi Mathieu,
I reviewed the build logs and observed that the generated rootfs does
not contain the lib/modules directory,
which should normally be created when kernel modules are installed into
the image.
Unfortunately, I was not able to find sufficient information in the logs
to explain why this is happening.
I attempted to reproduce the issue multiple times locally on an ARM host
and x86_64 host, but i am not able to reproduce the failure.
So far this intermittent failure seen only on arm host. So, we are
planning to run a few more tests on ab with some debug info added to the
test case.
If the issue still cannot be reproduced, we will temporarily skip this
test on arm64 for this release.
Will keep you posted by beginning of next week.
Thanks,
Harish
> Please tell me if you need me to extract any build artifact.
>
> Thanks,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [OE-core] [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample
2026-02-17 17:01 ` Mathieu Dubois-Briand
2026-02-23 7:21 ` Mathieu Dubois-Briand
2026-02-27 13:33 ` Harish Sadineni
@ 2026-03-04 12:39 ` Harish Sadineni
2 siblings, 0 replies; 20+ messages in thread
From: Harish Sadineni @ 2026-03-04 12:39 UTC (permalink / raw)
To: Yoann Congal, openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, Mathieu Dubois-Briand
[-- Attachment #1: Type: text/plain, Size: 3249 bytes --]
On 2/17/2026 10:31 PM, Mathieu Dubois-Briand wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Mon Feb 16, 2026 at 4:48 PM CET, Mathieu Dubois-Briand wrote:
>> On Mon Feb 16, 2026 at 2:09 PM CET, Harish Sadineni wrote:
>>> Hi Yoann, Mathieu,
>>>
>>> I tried few builds locally, but not able to reproduce this.
>>>
>>> On the autobuilder, We ran following builds which were completed
>>> successfully on ubuntu2504-vk-arm1:
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3326
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3331
>>>
>>> Additionally, One of Mathieu's build also ran successfully on
>>> oe-selftest-armhost ubuntu2504-vk-arm1:
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3323>
>>> From what I can see, build 3319
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3319>was
>>> triggered from a-full/3219
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/3219>:
>>> However, when checking a-full/3219, it triggered build 3317
>>> <https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3317>,
>>> where the rust kernel selftest passed.
>>>
>>> I can see few other builds were successful on oe-selftest-armhost with
>>> this patch series. I’m not sure why the failure occurred in this case.
>>> Mathieu, could you please try running a few additional builds to see if
>>> it reproduces?
>>>
>>> Thanks,
>>> Harish
>> Sure, I will launch a few builds and see how it goes.
>>
>> AB maintenance will begin soon, so I will start either later today or
>> tomorrow morning.
> I believe I got one:
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3346
Hi Yoann,
We performed few build with additional debug logging on autobuilder to
investigate why the test case was failing.
From the analysis, we observed that the failure occurs because
*qemu.run_serial("modprobe rust_minimal") *intermittently returns status
as *0*.
This causes the assertion to fail, even though the module is actually
loading successfully via modprobe.
To address this instability, we are removing**the assertion that depends
on the return status of*qemu.run_serial("modprobe rust_minimal")*.
Instead, we will rely on on the existing*dmesg *validation to confirm
whether the module has been successfully loaded.
The build with debug logging can be found at the following link:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3432/steps/15/logs/stdio
The relevant debug information is visible around lines 1202–1204.
Thanks,
Harish
>
> I backed up the build folder, it should stay there until next Monday.
> (/srv/pokybuild/yocto-worker/oe-selftest-armhost-3346-mathieu-2026-02-17
> on ubuntu2404-vk-arm1)
>
> Please tell me if you need me to extract any build artifact.
>
> Thanks,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
[-- Attachment #2: Type: text/html, Size: 5262 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v6 10/14] kernel.bbclass: Copy include/config/auto.conf in STAGING_KERNEL_BUILDDIR
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
` (3 preceding siblings ...)
2026-02-12 18:10 ` [PATCH v6 09/14] selftest/cases/runtime_test: Add test for Linux Rust sample Harish.Sadineni
@ 2026-02-12 18:10 ` Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 11/14] module-rust.bbclass: Prepare out-of-tree rust module compilation Harish.Sadineni
` (3 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Harish.Sadineni @ 2026-02-12 18:10 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
From: Yoann Congal <yoann.congal@smile.fr>
Linux commit aaed5c7739be ("kbuild: slim down package for building
external modules")[0] states that include/config/auto.conf is also a
file needed for out-of-tree build.
This avoids this error when building an out-of-tree Rust kernel module:
| make -C .../tmp/work-shared/qemux86-64/kernel-source M=$PWD
| make[1]: Entering directory '.../tmp/work-shared/qemux86-64/kernel-source'
| make[2]: Entering directory '.../tmp/work/qemux86_64-poky-linux/rust-out-of-tree-module/git/sources/rust-out-of-tree-module-git'
| .../tmp/work-shared/qemux86-64/kernel-source/Makefile:779: .../tmp/work-shared/qemux86-64/kernel-build-artifacts/include/config/auto.conf: No such file or directory
[0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aaed5c7739be81ebdd6008aedc8befd98c88e67a
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
meta/classes-recipe/kernel.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index f989b31c47..30a10b0801 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -570,6 +570,7 @@ do_shared_workdir () {
cp .config $kerneldir/
mkdir -p $kerneldir/include/config
cp include/config/kernel.release $kerneldir/include/config/kernel.release
+ cp include/config/auto.conf $kerneldir/include/config/auto.conf
if [ -e certs/signing_key.x509 ]; then
# The signing_key.* files are stored in the certs/ dir in
# newer Linux kernels
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH v6 11/14] module-rust.bbclass: Prepare out-of-tree rust module compilation
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
` (4 preceding siblings ...)
2026-02-12 18:10 ` [PATCH v6 10/14] kernel.bbclass: Copy include/config/auto.conf in STAGING_KERNEL_BUILDDIR Harish.Sadineni
@ 2026-02-12 18:10 ` Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 12/14] meta-skeleton: Add rust-out-of-tree-module recipe Harish.Sadineni
` (2 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Harish.Sadineni @ 2026-02-12 18:10 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
From: Harish Sadineni <Harish.Sadineni@windriver.com>
Add support for rust-out-of-tree module compilation:
- Add dependency to rust-native
- Remap ${S} in compiled output to avoid buildpath errors
- Added check to skip rust out-of-ree-module compilation,
if rust kernel support is not enabled
Co-developed-by:Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
meta/classes-recipe/module-rust.bbclass | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 meta/classes-recipe/module-rust.bbclass
diff --git a/meta/classes-recipe/module-rust.bbclass b/meta/classes-recipe/module-rust.bbclass
new file mode 100644
index 0000000000..f9cee5e5bd
--- /dev/null
+++ b/meta/classes-recipe/module-rust.bbclass
@@ -0,0 +1,21 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+inherit module
+
+DEPENDS += " rust-native"
+
+RUST_DEBUG_REMAP = "--remap-path-prefix=${S}=${TARGET_DBGSRC_DIR} "
+KRUSTFLAGS = " ${RUST_DEBUG_REMAP}"
+EXTRA_OEMAKE:append = " KRUSTFLAGS='${KRUSTFLAGS}'"
+
+python __anonymous() {
+ features = (d.getVar('KERNEL_RUST_SUPPORT') or "").split()
+ if "True" not in features:
+ raise bb.parse.SkipRecipe(
+ "Skipping rust-out-of-tree-module: KERNEL_RUST_SUPPORT is not enabled"
+ )
+}
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH v6 12/14] meta-skeleton: Add rust-out-of-tree-module recipe
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
` (5 preceding siblings ...)
2026-02-12 18:10 ` [PATCH v6 11/14] module-rust.bbclass: Prepare out-of-tree rust module compilation Harish.Sadineni
@ 2026-02-12 18:10 ` Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 13/14] make-mod-scripts: fix for buildpath issues with rust-out-of-tree compilation Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 14/14] runtime_test: Add rust-out-of-tree selftest Harish.Sadineni
8 siblings, 0 replies; 20+ messages in thread
From: Harish.Sadineni @ 2026-02-12 18:10 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
From: Yoann Congal <yoann.congal@smile.fr>
Basic template for an out-of-tree Linux kernel module written in Rust.
Mainly to test Rust integration into the kernel.
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
.../rust-out-of-tree-module_git.bb | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 meta-skeleton/recipes-kernel/rust-out-of-tree-module/rust-out-of-tree-module_git.bb
diff --git a/meta-skeleton/recipes-kernel/rust-out-of-tree-module/rust-out-of-tree-module_git.bb b/meta-skeleton/recipes-kernel/rust-out-of-tree-module/rust-out-of-tree-module_git.bb
new file mode 100644
index 0000000000..077780a192
--- /dev/null
+++ b/meta-skeleton/recipes-kernel/rust-out-of-tree-module/rust-out-of-tree-module_git.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Basic template for an out-of-tree Linux kernel module written in Rust"
+HOMEPAGE = "https://github.com/Rust-for-Linux/rust-out-of-tree-module"
+
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+inherit module-rust
+
+SRC_URI = "git://github.com/Rust-for-Linux/rust-out-of-tree-module.git;protocol=https;branch=main"
+SRCREV = "00b5a8ee2bf53532d115004d7636b61a54f49802"
+UPSTREAM_CHECK_COMMITS = "1"
+
+EXTRA_OEMAKE = "KDIR=${STAGING_KERNEL_DIR}"
+
+# The inherit of module.bbclass will automatically name module packages with
+# "kernel-module-" prefix as required by the oe-core build environment.
+RPROVIDES:${PN} += "kernel-module-rust-out-of-tree"
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH v6 13/14] make-mod-scripts: fix for buildpath issues with rust-out-of-tree compilation
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
` (6 preceding siblings ...)
2026-02-12 18:10 ` [PATCH v6 12/14] meta-skeleton: Add rust-out-of-tree-module recipe Harish.Sadineni
@ 2026-02-12 18:10 ` Harish.Sadineni
2026-02-12 18:10 ` [PATCH v6 14/14] runtime_test: Add rust-out-of-tree selftest Harish.Sadineni
8 siblings, 0 replies; 20+ messages in thread
From: Harish.Sadineni @ 2026-02-12 18:10 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
From: Harish Sadineni <Harish.Sadineni@windriver.com>
Fixes buildpath issues when compiling rust-out-of-tree recipe.
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
.../make-mod-scripts/make-mod-scripts_1.0.bb | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
index 6226382001..2de7d4976b 100644
--- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
+++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -43,3 +43,10 @@ do_configure() {
# More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
# Disable ccache for kernel build if kernel rust support is enabled to workaround this
CCACHE_DISABLE ?= "${@bb.utils.contains('KERNEL_RUST_SUPPORT', 'True', '1', '0', d)}"
+
+#Fixes buildpath issues when compiling rust-out-of-tree module
+RUST_DEBUG_REMAP ?= "--remap-path-prefix=${TMPDIR}/work-shared=${TARGET_DBGSRC_DIR} \
+ --remap-path-prefix=${TMPDIR}/work=${TARGET_DBGSRC_DIR} \
+"
+KRUSTFLAGS = " ${RUST_DEBUG_REMAP}"
+EXTRA_OEMAKE:append = ' KRUSTFLAGS="${KRUSTFLAGS}"'
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH v6 14/14] runtime_test: Add rust-out-of-tree selftest
2026-02-12 18:10 [PATCH v6 05/14] kernel-yocto-rust: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
` (7 preceding siblings ...)
2026-02-12 18:10 ` [PATCH v6 13/14] make-mod-scripts: fix for buildpath issues with rust-out-of-tree compilation Harish.Sadineni
@ 2026-02-12 18:10 ` Harish.Sadineni
8 siblings, 0 replies; 20+ messages in thread
From: Harish.Sadineni @ 2026-02-12 18:10 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, Sundeep.Kokkonda, bruce.ashfield, paul,
yoann.congal, elmehdi.younes
From: Yoann Congal <yoann.congal@smile.fr>
This new case tests that the rust-out-of-tree-module recipe compiles and
run properly: check that the dmesg output is as expected.
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
meta/lib/oeqa/selftest/cases/runtime_test.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index fe9783e81d..1b18cf2e5e 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -493,8 +493,11 @@ class RustKernel(OESelftestTestCase):
self.write_config(textwrap.dedent("""
KERNEL_RUST_SUPPORT = 'True'
KERNEL_EXTRA_FEATURES:append = ' features/kernel-sample/kernel-rust-sample.scc'
- CORE_IMAGE_EXTRA_INSTALL += "kernel-module-rust-minimal"
+ CORE_IMAGE_EXTRA_INSTALL += "kernel-module-rust-minimal kernel-module-rust-out-of-tree"
"""))
+
+ runCmd('bitbake-layers add-layer %s' % os.path.join(get_bb_var("COREBASE"), 'meta-skeleton'))
+ self.add_command_to_tearDown('bitbake-layers remove-layer */meta-skeleton')
bitbake(self.image)
with runqemu(self.image, runqemuparams = "nographic") as qemu:
@@ -504,3 +507,10 @@ class RustKernel(OESelftestTestCase):
_, output = qemu.run_serial("dmesg")
self.logger.debug(f"rust_minimal dmesg output:\n" + textwrap.indent(output, " "))
self.assertIn("Rust minimal sample", output, "Kernel Rust sample expected output not found in dmesg")
+
+ qemu.run_serial("dmesg -c > /dev/null")
+ status, _ = qemu.run_serial("modprobe rust_out_of_tree")
+ self.assertEqual(status, 1, "Loading rust_out_of_tree module failed!")
+ _, output = qemu.run_serial("dmesg")
+ self.logger.debug(f"rust_out_of_tree dmesg output:\n" + textwrap.indent(output, " "))
+ self.assertIn("Rust out-of-tree sample", output, "Out-of-tree Rust sample expected output not found in dmesg")
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread