From patchwork Tue May 2 10:06:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 89302 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp495195vqo; Tue, 2 May 2023 03:18:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7vPvvOWtmwyYbF4L+NDaCRc/Tr3aPNAVU6cV2xFRrexYuC3iM+Ryh/KoErfb0oBmyBBljo X-Received: by 2002:a17:902:ecca:b0:1a6:7632:2b20 with SMTP id a10-20020a170902ecca00b001a676322b20mr20581794plh.40.1683022707352; Tue, 02 May 2023 03:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683022707; cv=none; d=google.com; s=arc-20160816; b=RUkVxkp7K+L3idx7ga+9YtgFfgv/s7OcBjQsJLE6Mes7ZzyX0LJa07Rno7jqwKrE5Y vBY8Bo7sZ29dKB5RBNAMjBfNud0WdSPAm9iQ2obd64zxGxZ2s4OyiYClLtPE+ZibquXm 0a4WJFheG6e4PaQBY9LDex/4shxGKYLs2lDFjONbx8suqN69mO4fihkge78iVO/1eqTI 7nrB3giCG0nck85ujEyCMUgeYj5HVQ3Cxb3kKTWW8zr+wVQzVpgPG5I/QpUY/t3nQ+L2 fFPlNh0/LrzXpihcDyU1Ch7XhRIPHz5dnEDhwdtrnKaRelbS3m9JMj3Kt53LnV9PHYh8 2mwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=roAsuqZmAYpPyGSHA3+FCLH/Js5qbbAbBS4rsslppo8=; b=L0TBpkSF5SzGk2ujsWiNUtf6VpmPX7bAaMh+jZa63Jwpz75wh6XVT/NMHTkDWw9Y8r CGgu7HOZWxT8rcdYfSZCLJTHZXYUNeawPp6IMPYwzysoSKsT7FYkXcmUZtjsWdeAt0W7 WAELZJ5hLSgWBsKybwLmILQOHvrp3rmHUGLD3GchzqDGWDIeALmwgyLZqsaUjB/X2zFF UZ1zZ5E9bf2djh2c9+TtrUBWW4dljMOzW6doWxd712zRmYmqci+1oZEOFdWRZnjE/MzG mZdHZKAzt/98i3imUNCcJib1JdUXnHU0qjNDiRNbgdu7rOuI2AUT8+jD+tb/6JsgPh7O r2pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a170903028300b001a522f321f6si8348300plr.29.2023.05.02.03.18.12; Tue, 02 May 2023 03:18:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231608AbjEBKGu (ORCPT + 99 others); Tue, 2 May 2023 06:06:50 -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 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764777218638394534?= X-GMAIL-MSGID: =?utf-8?q?1764777218638394534?= When the documentation was updated for modular tests, the dependency on "KUNIT=y" 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=y". Fixes: c9ef2d3e3f3b3e56 ("KUnit: Docs: make start.rst example Kconfig follow 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-tools/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. config MISC_EXAMPLE_TEST tristate "Test for my example" if !KUNIT_ALL_TESTS - depends on MISC_EXAMPLE && KUNIT=y + depends on MISC_EXAMPLE && KUNIT default KUNIT_ALL_TESTS +Note: If your test does not support being built as a loadable module (which is +discouraged), replace tristate by bool, and depend on KUNIT=y instead of KUNIT. + 3. Add the following lines to ``drivers/misc/Makefile``: .. code-block:: make