On Wed, Sep 16, 2026 at 4:10 PM FUJITA Tomonori <[email protected]> wrote:
>
> From: FUJITA Tomonori <[email protected]>
>
> The test runs warn_on!(false) and warn_on!(true) inside a KUnit warning
> suppression block, then checks that one warning was counted. The counter
> is incremented by the kernel warning path, not by warn_on! itself, so a
> count of one means the warning was really reported.
>
> warn_flags! has a different definition per architecture. The test does not
> look at any of them, so it runs on every architecture that supports Rust.
>
> The new CONFIG_RUST_BUG_KUNIT_TEST depends on BUG. With CONFIG_BUG=n,
> warn_on! does nothing and no warning is counted.
>
> Signed-off-by: FUJITA Tomonori <[email protected]>
Applied to `rust-next` -- thanks!
[ Added newlines for clarity. - Miguel ]
Cheers,
Miguel