forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 474
Open
Labels
easyExpected to be an easy issue to resolve.Expected to be an easy issue to resolve.good first issueGood for newcomersGood for newcomersmediumExpected to be an issue of medium difficulty to resolve.Expected to be an issue of medium difficulty to resolve.• testingRelated to KUnit support (`#[test]`s, rustdoc tests), selftests and other testing.Related to KUnit support (`#[test]`s, rustdoc tests), selftests and other testing.
Description
Make KUnit #[test]
s support cfg
s, e.g.:
#[cfg(not(CONFIG_RUST_BITMAP_HARDENED))]
#[test]
fn owned_bitmap_out_of_bounds() -> Result<(), AllocError> {
// ...
}
and/or:
#[test]
#[cfg(not(CONFIG_RUST_BITMAP_HARDENED))]
fn owned_bitmap_out_of_bounds() -> Result<(), AllocError> {
// ...
}
A workaround is moving the cfg
inside the test.
Lore: https://lore.kernel.org/rust-for-linux/CANiq72==48=69hYiDo1321pCzgn_n1_jg=ez5UYXX91c+g5JVQ@mail.gmail.com/
Cc: @JoseExposito @sulix
This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes (including generating the documentation if changed, running the Rust doctests if changed, etc.), to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and to add a Suggested-by:
tag, and a Link:
tag to this issue. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.
Metadata
Metadata
Assignees
Labels
easyExpected to be an easy issue to resolve.Expected to be an easy issue to resolve.good first issueGood for newcomersGood for newcomersmediumExpected to be an issue of medium difficulty to resolve.Expected to be an issue of medium difficulty to resolve.• testingRelated to KUnit support (`#[test]`s, rustdoc tests), selftests and other testing.Related to KUnit support (`#[test]`s, rustdoc tests), selftests and other testing.