Le 17/06/2026 à 8:15 PM, Vaibhav Jain a écrit :
> Update KUnit Rust binding macro-rule 'kunit_unsafe_test_suite' to add and
> initialize the newly introduced 'kunit_suite.status'. Without this
> 'kunit_suite.status' field is never initialized which is an error for the
> Rust compiler.
> 
> Suggested-by: David Gow <[email protected]>
> Signed-off-by: Vaibhav Jain <[email protected]>
> ---
> Changelog
> =========
> V2->V3:
> Patch, not present in earlier version
> ---

Thanks very much. I'd prefer it if this could be squashed into patch 1,
just so we don't have a period where the rust build is broken.

Otherwise, good, though. With the formatting issue below fixed, this is

Reviewed-by: David Gow <[email protected]>

>  rust/kernel/kunit.rs | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs
> index a1edf7491579..e07894c72d0d 100644
> --- a/rust/kernel/kunit.rs
> +++ b/rust/kernel/kunit.rs
> @@ -288,6 +288,7 @@ macro_rules! kunit_unsafe_test_suite {
>                      log: ::core::ptr::null_mut(),
>                      suite_init_err: 0,
>                      is_init: false,
> +                 status: kernel::bindings::kunit_status_KUNIT_SUCCESS,

Alas, Rust code needs to be indented with four spaces, rather than tabs.
In theory, make LLVM=1 rustfmtcheck is supposed to catch this, but it's
not working for me.


>                  };
>  
>              #[used(compiler)]


Cheers,
-- David

Reply via email to