Thread (46 messages) 46 messages, 11 authors, 2023-06-30

[PATCH 0/6] KUnit integration for Rust doctests

STALE1189d

From: Miguel Ojeda <ojeda@kernel.org>
Date: 2023-06-14 18:11:19
Also in: linux-kselftest, linux-patches, lkml

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v2 [diff vs current]
This is the initial KUnit integration for running Rust documentation
tests within the kernel.

Thank you to the KUnit team for all the input and feedback on this
over the months, as well as the Intel LKP 0-Day team!

This may be merged through either the KUnit or the Rust trees. If
the KUnit team wants to merge it, then that would be great.

Please see the message in the main commit for the details.


Miguel Ojeda (6):
  rust: init: make doctests compilable/testable
  rust: str: make doctests compilable/testable
  rust: sync: make doctests compilable/testable
  rust: types: make doctests compilable/testable
  rust: support running Rust documentation tests as KUnit ones
  MAINTAINERS: add Rust KUnit files to the KUnit entry

 MAINTAINERS                       |   2 +
 lib/Kconfig.debug                 |  13 +++
 rust/.gitignore                   |   2 +
 rust/Makefile                     |  29 ++++++
 rust/bindings/bindings_helper.h   |   1 +
 rust/helpers.c                    |   7 ++
 rust/kernel/init.rs               |  25 +++--
 rust/kernel/kunit.rs              | 156 ++++++++++++++++++++++++++++
 rust/kernel/lib.rs                |   2 +
 rust/kernel/str.rs                |   4 +-
 rust/kernel/sync/arc.rs           |   9 +-
 rust/kernel/sync/lock/mutex.rs    |   1 +
 rust/kernel/sync/lock/spinlock.rs |   1 +
 rust/kernel/types.rs              |   6 +-
 scripts/.gitignore                |   2 +
 scripts/Makefile                  |   4 +
 scripts/rustdoc_test_builder.rs   |  73 ++++++++++++++
 scripts/rustdoc_test_gen.rs       | 162 ++++++++++++++++++++++++++++++
 18 files changed, 484 insertions(+), 15 deletions(-)
 create mode 100644 rust/kernel/kunit.rs
 create mode 100644 scripts/rustdoc_test_builder.rs
 create mode 100644 scripts/rustdoc_test_gen.rs


base-commit: d2e3115d717197cb2bc020dd1f06b06538474ac3
-- 
2.41.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help