From nobody Thu Feb 12 00:04:49 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 389B4C7EE21 for ; Tue, 2 May 2023 10:06:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233717AbjEBKGv (ORCPT ); Tue, 2 May 2023 06:06:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbjEBKGs (ORCPT ); Tue, 2 May 2023 06:06:48 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E57B4C2D for ; Tue, 2 May 2023 03:06:46 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed30:f07a:92a2:297:162b]) by laurent.telenet-ops.be with bizsmtp id rm6k2900E5FQxRj01m6k0e; Tue, 02 May 2023 12:06:45 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1ptmu8-000ykv-GQ; Tue, 02 May 2023 12:06:44 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1ptmuC-00AtHh-Ez; Tue, 02 May 2023 12:06:44 +0200 From: Geert Uytterhoeven To: Brendan Higgins , David Gow , Shuah Khan , Daniel Latypov , Jonathan Corbet Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] Documentation: kunit: Modular tests should not depend on KUNIT=y Date: Tue, 2 May 2023 12:06:38 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When the documentation was updated for modular tests, the dependency on "KUNIT=3Dy" was forgotten to be updated, now encouraging people to create tests that cannot be enabled when the KUNIT framework itself is modular. Fix this by changing the dependency to "KUNIT". Document when it is appropriate (and required) to depend on "KUNIT=3Dy". Fixes: c9ef2d3e3f3b3e56 ("KUnit: Docs: make start.rst example Kconfig follo= w style.rst") Signed-off-by: Geert Uytterhoeven Reviewed-by: David Gow --- Documentation/dev-tools/kunit/start.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-to= ols/kunit/start.rst index c736613c9b199bff..9619a044093042ce 100644 --- a/Documentation/dev-tools/kunit/start.rst +++ b/Documentation/dev-tools/kunit/start.rst @@ -256,9 +256,12 @@ Now we are ready to write the test cases. =20 config MISC_EXAMPLE_TEST tristate "Test for my example" if !KUNIT_ALL_TESTS - depends on MISC_EXAMPLE && KUNIT=3Dy + depends on MISC_EXAMPLE && KUNIT default KUNIT_ALL_TESTS =20 +Note: If your test does not support being built as a loadable module (whic= h is +discouraged), replace tristate by bool, and depend on KUNIT=3Dy instead of= KUNIT. + 3. Add the following lines to ``drivers/misc/Makefile``: =20 .. code-block:: make --=20 2.34.1