summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc.rs
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2025-08-16 23:19:00 +0200
committerDanilo Krummrich <dakr@kernel.org>2025-08-24 15:30:40 +0200
commitfe927defbb4f31c15a52f0372d7f5d608f161086 (patch)
treef1f41a36cc079497bde0b2e5671817a782c21fde /rust/kernel/alloc.rs
parent17d5efcbfe6f3da23afb79d84c27cefb2b3f331a (diff)
rust: alloc: remove `allocator_test`
Given we do not have tests that rely on it anymore, remove `allocator_test`, which simplifies the complexity of the build. In particular, it avoids potential issues with `rusttest`, such as the one fixed at [1], where a public function was added to `Kmalloc` and used elsewhere, but it was not added to `Cmalloc`; or trivial issues like a missing import [2] due to not many people testing that target. The only downside is that we cannot use it in the `macros`' crate examples anymore, but we did not feel a need for that so far, and anyway we could support that by running those within the kernel too, which we may do regardless. Link: https://lore.kernel.org/rust-for-linux/20250816204215.2719559-1-ojeda@kernel.org/ [1] Link: https://lore.kernel.org/rust-for-linux/20250816210214.2729269-1-ojeda@kernel.org/ [2] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20250816211900.2731720-1-ojeda@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/alloc.rs')
-rw-r--r--rust/kernel/alloc.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs
index 25a2df50f59a..9c154209423c 100644
--- a/rust/kernel/alloc.rs
+++ b/rust/kernel/alloc.rs
@@ -2,18 +2,11 @@
//! Implementation of the kernel's memory allocation infrastructure.
-#[cfg(not(testlib))]
pub mod allocator;
pub mod kbox;
pub mod kvec;
pub mod layout;
-#[cfg(testlib)]
-pub mod allocator_test;
-
-#[cfg(testlib)]
-pub use self::allocator_test as allocator;
-
pub use self::kbox::Box;
pub use self::kbox::KBox;
pub use self::kbox::KVBox;