lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABVgOS=_ZLQSbAYevA3wYZpoqkJgRF8iipL8rwSzPqwhX=3-fw@mail.gmail.com>
Date:   Thu, 4 May 2023 13:43:30 +0800
From:   David Gow <davidgow@...gle.com>
To:     Geert Uytterhoeven <geert+renesas@...der.be>
Cc:     Brendan Higgins <brendan.higgins@...ux.dev>,
        Shuah Khan <skhan@...uxfoundation.org>,
        Daniel Latypov <dlatypov@...gle.com>,
        Jonathan Corbet <corbet@....net>,
        linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Sadiya Kazi <sadiyakazi@...gle.com>
Subject: Re: [PATCH] Documentation: kunit: Modular tests should not depend on KUNIT=y

On Tue, 2 May 2023 at 18:06, Geert Uytterhoeven <geert+renesas@...der.be> 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 <geert+renesas@...der.be>
> ---

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 <davidgow@...gle.com>

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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ