forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a doctest for AllocLayout::new()
#1131
Labels
easy
Expected to be an easy issue to resolve.
good first issue
Good for newcomers
• lib
Related to the `rust/` library.
Comments
ojeda
added
easy
Expected to be an easy issue to resolve.
• lib
Related to the `rust/` library.
labels
Nov 25, 2024
Hi, I'm new to the kernel development process and I'd like to claim this. |
Of course, please go ahead! |
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Dec 3, 2024
Added a rustdoc example and Kunit test to the `ArrayLayout` struct's `ArrayLayout::new()` function. Kunit tests ran using `./tools/testing/kunit/kunit.py run \ --make_options LLVM=1 \ --kconfig_add CONFIG_RUST=y` passed. Generated documentation looked as expected. Signed-off-by: Jimmy Ostler <[email protected]> Suggested-by: Boqun Feng <[email protected]> Link: Rust-for-Linux#1131
Just sent in the patch! The thread should be here. |
You're welcome! It is nice to hear they are useful :) |
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Dec 5, 2024
Add a rustdoc example and Kunit test to the `ArrayLayout` struct's `ArrayLayout::new()` function. Add an implementation of `From<LayoutError> for Error` for the `kernel::alloc::LayoutError`. This is necessary for the new test to compile. Change the `From` implementation on `core::alloc::LayoutError` to avoid collisions with `kernel::alloc::LayoutError`, and modify imports to explicitly import `kernel::alloc::LayoutError` instead. Suggested-by: Boqun Feng <[email protected]> Link: Rust-for-Linux#1131 Signed-off-by: Jimmy Ostler <[email protected]>
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Dec 18, 2024
Add a rustdoc example and Kunit test to the `ArrayLayout` struct's `ArrayLayout::new()` function. This patch depends on the first patch in this series in order for the kunit test to compile. Suggested-by: Boqun Feng <[email protected]> Link: Rust-for-Linux#1131 Signed-off-by: Jimmy Ostler <[email protected]>
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Dec 20, 2024
Add a rustdoc example and Kunit test to the `ArrayLayout` struct's `ArrayLayout::new()` function. This patch depends on the first patch in this series in order for the kunit test to compile. Suggested-by: Boqun Feng <[email protected]> Link: Rust-for-Linux#1131 Reviewed-by: Danilo Krummrich <[email protected]> Signed-off-by: Jimmy Ostler <[email protected]>
ojeda
pushed a commit
to ojeda/linux
that referenced
this issue
Jan 13, 2025
Add a rustdoc example and Kunit test to the `ArrayLayout` struct's `ArrayLayout::new()` function. This patch depends on the first patch in this series in order for the KUnit test to compile. Suggested-by: Boqun Feng <[email protected]> Link: Rust-for-Linux#1131 Reviewed-by: Danilo Krummrich <[email protected]> Signed-off-by: Jimmy Ostler <[email protected]> Link: https://lore.kernel.org/r/f1564da5bcaa6be87aee312767a1d1694a03d1b7.1734674670.git.jtostler1@gmail.com [ Added periods to example comments. Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
ojeda
pushed a commit
that referenced
this issue
Jan 13, 2025
Add a rustdoc example and Kunit test to the `ArrayLayout` struct's `ArrayLayout::new()` function. This patch depends on the first patch in this series in order for the KUnit test to compile. Suggested-by: Boqun Feng <[email protected]> Link: #1131 Reviewed-by: Danilo Krummrich <[email protected]> Signed-off-by: Jimmy Ostler <[email protected]> Link: https://lore.kernel.org/r/f1564da5bcaa6be87aee312767a1d1694a03d1b7.1734674670.git.jtostler1@gmail.com [ Added periods to example comments. Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
easy
Expected to be an easy issue to resolve.
good first issue
Good for newcomers
• lib
Related to the `rust/` library.
As Lina and Janne reported, there was a bug in
AllocLayout::new()
. Although it's fixed, it would be better to have something unit/doc tests about it like this.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://rust-for-linux.com/contributing for details.
Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel. Please do not take it if you do not plan to make other contributions to the kernel.
The text was updated successfully, but these errors were encountered: