diff options
| author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2026-09-16 23:09:52 +0900 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-10-01 22:38:08 +0200 |
| commit | cd56a1c858ff34cc8b71674a6bdf2f7a899abf67 (patch) | |
| tree | bc45cf40d30ff637d1fd5eda410f524af259a205 /tools/lib/python/kdoc | |
| parent | 951d09ca450ca76a695016ea76c3fa653bd20439 (diff) | |
| download | linux-next-cd56a1c858ff34cc8b71674a6bdf2f7a899abf67.tar.gz linux-next-cd56a1c858ff34cc8b71674a6bdf2f7a899abf67.zip | |
rust: bug: add a KUnit test for warn_on!
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 <fujita.tomonori@gmail.com>
Link: https://patch.msgid.link/20260916140952.3290924-1-tomo@flapping.org
[ Added newlines for clarity. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions
