rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/3] Rust allocator and kvec improvements
@ 2025-07-31  2:50 Hui Zhu
  2025-07-31  2:50 ` [PATCH v7 1/3] rust: allocator: add KUnit tests for alignment guarantees Hui Zhu
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Hui Zhu @ 2025-07-31  2:50 UTC (permalink / raw)
  To: Danilo Krummrich, Lorenzo Stoakes, Vlastimil Babka,
	Liam R . Howlett, Uladzislau Rezki, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, bjorn3_gh, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, rust-for-linux, linux-kernel, akpm,
	vitaly.wool
  Cc: Hui Zhu

From: Hui Zhu <zhuhui@kylinos.cn>

This series adds tests and docs for Rust kernel components:
Patch 1 adds KUnit tests for allocator alignment guarantees.
Patch 2 documents KVec::as_slice with a usage example.
Patch 3 simplifies KVec test module naming convention.

Both patches are co-developed with Geliang Tang. Based on [1].
Tested on x86_64 using KUnit.

Changelog:
v7:
Updated according to the comments of Miguel.
v6:
According to the comments of Danilo, updated test for allocator.rs
and allocator rebase onto [1].
v5:
According to the comments of Danilo, change to use generic struct and
allocator Generics in allocator.rs.
v4:
According to the comments of, add the error check for push.
v3:
According to the comments of Danilo and Boqun, move KVec test to doc
example and move VBox to allocator unit tests.
v2:
According to the comments of Danilo, updated the commit to samples the
usage of VBox and KVec.

Hui Zhu (3):
  rust: allocator: add KUnit tests for alignment guarantees
  rust: alloc: kvec: add doc example for as_slice method
  rust: alloc: kvec: simplify KUnit test module name to "rust_kvec"

 rust/kernel/alloc/allocator.rs | 56 ++++++++++++++++++++++++++++++++++
 rust/kernel/alloc/kvec.rs      | 12 +++++++-
 2 files changed, 67 insertions(+), 1 deletion(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-08-15 17:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31  2:50 [PATCH v7 0/3] Rust allocator and kvec improvements Hui Zhu
2025-07-31  2:50 ` [PATCH v7 1/3] rust: allocator: add KUnit tests for alignment guarantees Hui Zhu
2025-07-31  9:19   ` Danilo Krummrich
2025-08-13 16:48     ` Danilo Krummrich
2025-07-31  2:50 ` [PATCH v7 2/3] rust: alloc: kvec: add doc example for as_slice method Hui Zhu
2025-07-31  2:50 ` [PATCH v7 3/3] rust: alloc: kvec: simplify KUnit test module name to "rust_kvec" Hui Zhu
2025-07-31  4:14 ` [PATCH v7 0/3] Rust allocator and kvec improvements David Gow
2025-07-31  9:01   ` Danilo Krummrich
2025-08-15 17:53 ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).