Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp78484rwr; Wed, 3 May 2023 22:56:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59PDSuvGsyQ9eBwrpKUrDlu7Ybh2wtdVQ/N0AWVy9xaFz0J4f9eN1SIRdq6XU/Xdst7DDk X-Received: by 2002:a05:6a21:7898:b0:f0:3724:a9b0 with SMTP id bf24-20020a056a21789800b000f03724a9b0mr1441335pzc.3.1683179803898; Wed, 03 May 2023 22:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683179803; cv=none; d=google.com; s=arc-20160816; b=zaH7FS+BcanBZBFASWNSlsXE5QpHlQTcgU4RPcp7r0spkToPCAOjPdRkhmjwc2e8Vy 1cAVNttXBnBSdiHzwR7RstaOdHqetL6r9pluQXJicSau0mGTA6/U842yr9D9dSZgaJ+K PKYrjMLI6S7Oha57BgFD0h4vs2OK8MAn6Iq6j1XANPBRCoXlpwab7YGefPwy+axTzRXT 5EtAseYDVOjYrlhPrG9yF8dNAC1s3zxHr59t8cj3COw/QrPNqzjH3q+7V3IiF0h33lgJ OzDBIfjwlcMU2bWtw0VaAukVBsWe8OvOL08ULaHRbbRKsIsUeQk3mu0ytxpttxipgfBl sytg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sKEkZFVH2KZiPZGQ6onZKDypE8VqSqbA6RJxh3D4iqQ=; b=w98nphNjt3AlADAC+lkZ2DyMqZJzbAJRD7sYUIjVZxHnArxCUajNshpCPA1c4/ACDk tVlOReXx6YQ2UfoesZVSkYEhyUiarnPwpiE5PCkek7wlfoKNsNAVa8AmCWvbQmwWA/ha LF/rNjASA8jILyX5a7I578xcHPi0eI3Q4M/B5I4VsLs+9pct4fevLPsCsY3Iva9ngg+B Ad9POMJr0QB4CN5vEV7UZN7/lz+3+yYckvvMIT5hELjZN3ATL6CQaOfmfVrv1RExR9EQ ZY5qilPvLiwL6jLJoxnmbEXfNQeM/6BOfvTSkzpSYk/DiakbenV4G5iSLgMFyjwuffgp pzqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Curk6tJT; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 85-20020a621858000000b0063b80f4bfa6si1437537pfy.132.2023.05.03.22.56.29; Wed, 03 May 2023 22:56:43 -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; dkim=pass header.i=@google.com header.s=20221208 header.b=Curk6tJT; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229446AbjEDFnr (ORCPT + 99 others); Thu, 4 May 2023 01:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbjEDFnp (ORCPT ); Thu, 4 May 2023 01:43:45 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 823651FED for ; Wed, 3 May 2023 22:43:43 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-3ef34c49cb9so628491cf.1 for ; Wed, 03 May 2023 22:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683179022; x=1685771022; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sKEkZFVH2KZiPZGQ6onZKDypE8VqSqbA6RJxh3D4iqQ=; b=Curk6tJTkLFKybxwmRhdhOMhDNxdujlcyezyNSQuqzZfggOJNoM2EDpT5V4XZ6oapu zvSeaSNeD2mM1fS4+ksRbGvxoNMfklBWHYPW2fxxgvcd+Cn1oWxDAG3ZB6UkDRtxgHnH r2unq2szYHJNzNP0HuPrxQq+12Wk3ftDc7KWHswgtcc2z/9gMabf1AYtfCeGZgCZUEFR GnmfDW3b1sDfyIkGHZ07v/dLE0OBZrvXnS9Umkyr/rrqiShf94DasX9ZyGTjGmU/f72i ZLSQfR7GBXBHe4k6Nis2bbhKHjwRb9E0gl4x0lakCcsu/Mn7nqSeAZaiwKwRiZVD3UVf vJRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683179022; x=1685771022; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sKEkZFVH2KZiPZGQ6onZKDypE8VqSqbA6RJxh3D4iqQ=; b=Koq1lC0juIMjPCYWKHBbggxjtgSeRbA9ms+B+dRWGcQX2LU5j8iIaIXEOJw/EGY7Mt EYErq6T/YO8lZY3eJCJ8vVYywJkZblFAs1BVsv89NSDJfV8dJpchUXPPie4eaO+0KbMh 8ybPfSCD1I4OaRWOeI/8DxQRA4pPK8ZJmplGxIYjH5SRh+TM1oJv1Ef7XvAvt0EjJxrP C/Eq6r+PmYMbqW/9sOZGOj8JHF5ho4rpyt0OGmZOneSXzwbCsHHa2YKQE7DkhCiqR7eB y4sGJAK7ltn/73YmsqacwFyMBmCyNt443tj7BXoaFD+d69I2WLy2aJXxKhrCJPkJ933y bKZg== X-Gm-Message-State: AC+VfDzb9z5oZ11rEqXpgw7Jl4Dpd0NuvDmjJ1Hfb88IVUItEg9ZaWiE uF+X558U8xnUl+cdFfCxbeTlcSQIQgb7w1bNPMcUkQ== X-Received: by 2002:ac8:5785:0:b0:3ef:3083:a437 with SMTP id v5-20020ac85785000000b003ef3083a437mr240044qta.18.1683179022549; Wed, 03 May 2023 22:43:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Gow Date: Thu, 4 May 2023 13:43:30 +0800 Message-ID: Subject: Re: [PATCH] Documentation: kunit: Modular tests should not depend on KUNIT=y To: Geert Uytterhoeven Cc: Brendan Higgins , Shuah Khan , Daniel Latypov , Jonathan Corbet , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Sadiya Kazi Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Tue, 2 May 2023 at 18:06, Geert Uytterhoeven wrote: > > 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 > --- Nice catch: we definitely should be recommending that all tests are buildable as modules if possible. (I think this is already the case in most of the rest of the documentation..., but the getting started guide really shouldn't be teaching bad habits.) Reviewed-by: David Gow Cheers, -- David > 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 >