[PATCH 0/3] rust: add Kconfig.test
From: Yury Norov
Date: Thu Apr 16 2026 - 23:16:28 EST
There are 6 individual Rust KUnit tests. All the tests are compiled
unconditionally now, which adds ~200 kB to the kernel image on my
x86_64 buld. As Rust matures, this bloating will inevitably grow.
Add Kconfig.test, which provides a RUST_KUNIT_TESTS menu, and all
individual tests under it.
Yury Norov (3):
rust: tests: drop 'use crate' in bitmap and atomic KUnit tests
rust: testing: add Kconfig for KUnit test
Documentation: rust: testing: add Kconfig guidance
Documentation/rust/testing.rst | 5 ++-
init/Kconfig | 2 +
rust/kernel/Kconfig.test | 76 ++++++++++++++++++++++++++++
rust/kernel/alloc/allocator.rs | 1 +
rust/kernel/alloc/kvec.rs | 1 +
rust/kernel/bitmap.rs | 5 +--
rust/kernel/kunit.rs | 1 +
rust/kernel/str.rs | 1 +
rust/kernel/sync/atomic/predefine.rs | 5 +--
9 files changed, 79 insertions(+), 7 deletions(-)
create mode 100644 rust/kernel/Kconfig.test
--
2.51.0