On Mon, Sep 8, 2025 at 9:22 AM Burak Emir <[email protected]> wrote: > > + #[test] > + fn owned_bitmap_out_of_bounds() -> Result<(), AllocError> { > + // TODO: Kunit #[test]s do not support `cfg` yet, > + // so we add it here in the body. > + #[cfg(not(CONFIG_RUST_BITMAP_HARDENED))] > + { > + let mut b = BitmapVec::new(128, GFP_KERNEL)?; > + b.set_bit(2048); > + b.set_bit_atomic(2048); > + b.clear_bit(2048); > + b.clear_bit_atomic(2048); > + assert_eq!(None, b.next_bit(2048)); > + assert_eq!(None, b.next_zero_bit(2048)); > + assert_eq!(None, b.last_bit()); > + } > + Ok(()) > + }
For context, Kaibo Ma already posted a patch to solve that limitation, so we should be able to clean this up e.g. next cycle: https://lore.kernel.org/rust-for-linux/[email protected]/ Cheers, Miguel
