Linux Documentation
 help / color / mirror / Atom feed
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 1/2] gpu: nova-core: add a KUnit test configuration option
Date: Tue, 18 Aug 2026 11:23:23 -0400	[thread overview]
Message-ID: <20260818152324.587932-2-ynorov@nvidia.com> (raw)
In-Reply-To: <20260818152324.587932-1-ynorov@nvidia.com>

The continuation-record KUnit tests are currently built whenever both
Nova Core and KUnit are enabled, providing no way to select the tests
independently.

Add CONFIG_NOVA_CORE_KUNIT_TEST and use it to guard the test suite.
Follow the usual KUnit convention of enabling the option through
CONFIG_KUNIT_ALL_TESTS.

Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Yury Norov <ynorov@nvidia.com>
---
 drivers/gpu/nova-core/Kconfig                  | 12 ++++++++++++
 drivers/gpu/nova-core/gsp/cmdq/continuation.rs |  1 +
 2 files changed, 13 insertions(+)

diff --git a/drivers/gpu/nova-core/Kconfig b/drivers/gpu/nova-core/Kconfig
index f918f69e0599..d05c2c1d46d9 100644
--- a/drivers/gpu/nova-core/Kconfig
+++ b/drivers/gpu/nova-core/Kconfig
@@ -15,3 +15,15 @@ config NOVA_CORE
 	  This driver is work in progress and may not be functional.
 
 	  If M is selected, the module will be called nova-core.
+
+config NOVA_CORE_KUNIT_TEST
+	bool "KUnit tests for Nova Core" if !KUNIT_ALL_TESTS
+	depends on NOVA_CORE && KUNIT
+	default KUNIT_ALL_TESTS
+	help
+	  This option enables KUnit tests for internal components of the Nova
+	  Core driver. The tests currently do not require GPU hardware. These
+	  are only for development and testing, not for regular kernel use
+	  cases.
+
+	  If unsure, say N.
diff --git a/drivers/gpu/nova-core/gsp/cmdq/continuation.rs b/drivers/gpu/nova-core/gsp/cmdq/continuation.rs
index 05e904f18097..c0aa16c8fbf4 100644
--- a/drivers/gpu/nova-core/gsp/cmdq/continuation.rs
+++ b/drivers/gpu/nova-core/gsp/cmdq/continuation.rs
@@ -167,6 +167,7 @@ fn init_variable_payload(
     }
 }
 
+#[cfg(CONFIG_NOVA_CORE_KUNIT_TEST)]
 #[kunit_tests(nova_core_gsp_continuation)]
 mod tests {
     use super::*;
-- 
2.53.0

  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 [PATCH 0/2] rust: kunit: enforce test configurability Yury Norov
2026-08-18 15:23 ` Yury Norov [this message]
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-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox