Re: [PATCH v5 2/3] rust: bitfield: Add KUnit tests for bitfield

From: Alexandre Courbot

Date: Sun Jun 07 2026 - 08:34:11 EST


On Sat Jun 6, 2026 at 9:43 PM JST, Alexandre Courbot wrote:
<...>
> diff --git a/rust/kernel/bitfield.rs b/rust/kernel/bitfield.rs
> index 2498107979dc..0e2f805c19ba 100644
> --- a/rust/kernel/bitfield.rs
> +++ b/rust/kernel/bitfield.rs
> @@ -546,3 +546,317 @@ fn fmt(&self, f: &mut ::kernel::fmt::Formatter<'_>) -> ::kernel::fmt::Result {
> }
> };
> }
> +
> +#[cfg(CONFIG_RUST_BITFIELD_KUNIT_TEST)]
> +#[::kernel::macros::kunit_tests(kernel_bitfield)]

Looking at the other tests, this should maybe be named
`rust_kernel_bitfield`.