From: Yury Norov <ynorov@nvidia.com>
To: Miguel Ojeda <ojeda@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>,
rust-for-linux@vger.kernel.org, nova-gpu@lists.linux.dev
Cc: Yury Norov <ynorov@nvidia.com>, Gary Guo <gary@garyguo.net>,
John Hubbard <jhubbard@nvidia.com>,
Alice Ryhl <aliceryhl@google.com>,
Burak Emir <burak.emir@gmail.com>,
Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <david@davidgow.net>, Rae Moar <raemoar63@gmail.com>,
Yury Norov <yury.norov@gmail.com>,
linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] rust: kunit: enforce test configurability
Date: Tue, 18 Aug 2026 11:23:22 -0400 [thread overview]
Message-ID: <20260818152324.587932-1-ynorov@nvidia.com> (raw)
Make every Rust KUnit test suite require the Kconfig option that controls
it, and let the `kunit_tests` macro apply the corresponding `#[cfg]`
attribute.
Most Rust KUnit suites currently combine a separate `#[cfg]` attribute with
`#[kunit_tests]`. The macro does not enforce this pattern, however, and the
Nova continuation suite currently has no dedicated test option.
Add a Nova Core KUnit option first and use it to guard the existing suite.
Then require a controlling Kconfig symbol in `kunit_tests` by moving the
guard into the macro. Update all callers and documentation as well.
Yury Norov (2):
gpu: nova-core: add a KUnit test configuration option
rust: kunit: move test configuration gating into macro
Documentation/rust/testing.rst | 11 ++++---
drivers/gpu/nova-core/Kconfig | 12 ++++++++
.../gpu/nova-core/gsp/cmdq/continuation.rs | 2 +-
rust/kernel/alloc/allocator.rs | 3 +-
rust/kernel/alloc/kvec.rs | 3 +-
rust/kernel/bitfield.rs | 3 +-
rust/kernel/bitmap.rs | 3 +-
rust/kernel/kunit.rs | 3 +-
rust/kernel/str.rs | 3 +-
rust/kernel/sync/atomic/predefine.rs | 3 +-
rust/macros/kunit.rs | 30 +++++++++++++++++--
rust/macros/lib.rs | 6 ++--
12 files changed, 55 insertions(+), 27 deletions(-)
base-commit: aaa4e12f32b6552db1469a796312b25a0def7164
--
2.53.0
next reply other threads:[~2026-08-18 15:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 15:23 Yury Norov [this message]
2026-08-18 15:23 ` [PATCH 1/2] gpu: nova-core: add a KUnit test configuration option Yury Norov
2026-08-18 15:23 ` [PATCH 2/2] rust: kunit: move test configuration gating into macro Yury Norov
2026-08-18 20:44 ` [PATCH 0/2] rust: kunit: enforce test configurability Miguel Ojeda
2026-08-18 21:23 ` Gary Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260818152324.587932-1-ynorov@nvidia.com \
--to=ynorov@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=brendan.higgins@linux.dev \
--cc=burak.emir@gmail.com \
--cc=dakr@kernel.org \
--cc=david@davidgow.net \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=raemoar63@gmail.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.