diff options
Diffstat (limited to 'Documentation/rust')
| -rw-r--r-- | Documentation/rust/arch-support.rst | 1 | ||||
| -rw-r--r-- | Documentation/rust/testing.rst | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/rust/arch-support.rst b/Documentation/rust/arch-support.rst index 6e6a515d0899..4f980815e92a 100644 --- a/Documentation/rust/arch-support.rst +++ b/Documentation/rust/arch-support.rst @@ -19,6 +19,7 @@ Architecture Level of support Constraints ``arm64`` Maintained Little Endian only. ``loongarch`` Maintained \- ``riscv`` Maintained ``riscv64`` and LLVM/Clang only. +``s390`` Maintained ``CONFIG_EXPOLINE`` must be disabled. ``um`` Maintained \- ``x86`` Maintained ``x86_64`` only. ============= ================ ============================================== diff --git a/Documentation/rust/testing.rst b/Documentation/rust/testing.rst index f43cb77bcc69..e3943aceceb9 100644 --- a/Documentation/rust/testing.rst +++ b/Documentation/rust/testing.rst @@ -140,11 +140,15 @@ are also mapped to KUnit. These tests are introduced by the ``kunit_tests`` procedural macro, which takes the name of the test suite as an argument. +Each test suite should be guarded by a Kconfig option in +``rust/kernel/Kconfig.test``. + For instance, assume we want to test the function ``f`` from the documentation tests section. We could write, in the same file where we have our function: .. code-block:: rust + #[cfg(CONFIG_RUST_MYMOD_KUNIT_TEST)] #[kunit_tests(rust_kernel_mymod)] mod tests { use super::*; @@ -173,6 +177,7 @@ the unit type ``()``) or ``Result`` (i.e. any ``Result<T, E>``). For instance: .. code-block:: rust + #[cfg(CONFIG_RUST_MYMOD_KUNIT_TEST)] #[kunit_tests(rust_kernel_mymod)] mod tests { use super::*; |
