rust: alloc: remove `allocator_test`
Subsystems (2)
Miguel Ojeda
maintainerPATCH 1/1 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.
---
This one goes on top of:
https://lore.kernel.org/rust-for-linux/[email protected]/
rust/kernel/alloc.rs | 7 -- rust/kernel/alloc/allocator_test.rs | 113 ---------------------------- 2 files changed, 120 deletions(-) delete mode 100644 rust/kernel/alloc/allocator_test.rs
rust/kernel/alloc.rs +0 -7
@@ -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_testas allocator; -pub use self::kbox::Box ;pub use self::kbox::KBox ;pub use self::kbox::KVBox ;
rust/kernel/alloc/allocator_test.rs deleted +0 -113
113 lines not on this page · raw message
--
2.50.1
Quoted 8 lines · Miguel Ojeda
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 toKmallocand used elsewhere, but it was not added toCmalloc; or trivial issues like a missing import [2] due to not many people testing that target.
Quoted 8 lines
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.
Applied to alloc-next, thanks!