Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6621283rwr; Tue, 2 May 2023 03:09:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zLeDau8dEk1drrHWgdQEjQ5KdHFmsf0OiYWjZsl0Swl0Yut7e9HkMYsHD2OLazEaeRp32 X-Received: by 2002:a17:903:11c4:b0:1a9:7365:fc2a with SMTP id q4-20020a17090311c400b001a97365fc2amr20961442plh.26.1683022186662; Tue, 02 May 2023 03:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683022186; cv=none; d=google.com; s=arc-20160816; b=NiZX7MyxKduEI5Yq+tHBWmkmNKrdUqT++tuSxOAdi+NDCNBK+szxkm+p0wEYhmOOuL 4teglcQyVsLRSPXwHyqdEWTUmLEA7NOMbwfPcL31t5fOjb2GHkXnJRCHl2RZxLDDOnNK b8IO4IYGLNrUC1bW8kjWqkOtuun6tjuSYx7jDDcoNkurk6SCZviDkr5iHuuRpJmj/pUq SSMajg4tGwTSw2NFFZMguTkpz4+AL0MKxXVzwktzIeSUR+Xx6H/rRSyt5nVOY5/XFFPs 0W0/skn1oPaYjUnqk13g7rMrmHPcRdeVpfHG0x4Qpn9m+RUV4laZ0vR+6M2zkVwd4ylE biPg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a170902cec400b001a961bfe4b7si25609759plg.362.2023.05.02.03.09.34; Tue, 02 May 2023 03:09:46 -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 S233499AbjEBKGu (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 Content-Transfer-Encoding: 8bit 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 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 --- 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 -- 2.34.1