Skip to content

Commit 0a8d4ea

Browse files
committed
Documentation: rust: rename #[test]s to "rusttest host tests"
Now that `rusttest`s are not really used much, clarify the section of the documentation that describes them. In addition, free the section name for the KUnit-based `#[test]`s that will be added afterwards. To do so, rename the section into `rusttest` host tests. Reviewed-by: David Gow <davidgow@google.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20250502215133.1923676-7-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 2d6c87d commit 0a8d4ea

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Documentation/rust/testing.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,17 @@ please see:
130130

131131
https://rust.docs.kernel.org/kernel/error/type.Result.html#error-codes-in-c-and-rust
132132

133-
The ``#[test]`` tests
134-
---------------------
133+
The ``rusttest`` host tests
134+
---------------------------
135135

136-
Additionally, there are the ``#[test]`` tests. These can be run using the
137-
``rusttest`` Make target::
136+
These are userspace tests that can be built and run in the host (i.e. the one
137+
that performs the kernel build) using the ``rusttest`` Make target::
138138

139139
make LLVM=1 rusttest
140140

141-
This requires the kernel ``.config``. It runs the ``#[test]`` tests on the host
142-
(currently) and thus is fairly limited in what these tests can test.
141+
This requires the kernel ``.config``.
142+
143+
Currently, they are mostly used for testing the ``macros`` crate's examples.
143144

144145
The Kselftests
145146
--------------

0 commit comments

Comments
 (0)