On Thu, Jun 12, 2025 at 11:53 AM Miguel Ojeda <miguel.ojeda.sando...@gmail.com> wrote: > > On Thu, Jun 12, 2025 at 10:47 AM Burak Emir <b...@google.com> wrote: > > > > True, I observed the panic but the test is erroneously marked as failing. > > I have commented it out and added TODO to enable it once > > [should_panic] is supported. > > No, please do not use `unwrap()`. > > Instead, tests are supposed to be written as you would normally write > kernel code as much as possible, i.e. fallible. > > We also have now support for tests that return `-> Result`, so you can > e.g. use the `?` operator.
Point taken about unwrap(), I will update all unit tests to return a result. The lack for [should_panic] support remains (CONFIG_RUST_BITMAP_HARDENED is intended to produce a panic which would be nice to test), so I can only comment out the test. Thanks, Burak