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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Oct 2020 16:07:15 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     "Theodore Y. Ts'o" <tytso@....edu>
Cc:     Brendan Higgins <brendanhiggins@...gle.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Andreas Dilger <adilger.kernel@...ger.ca>,
        Shuah Khan <skhan@...uxfoundation.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Matthieu Baerts <matthieu.baerts@...sares.net>,
        linux-ext4@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        David Gow <davidgow@...gle.com>
Subject: Re: [PATCH] ext: EXT4_KUNIT_TESTS should depend on EXT4_FS instead of
 selecting it

On 10/21/20 3:36 PM, Theodore Y. Ts'o wrote:
> On Wed, Oct 21, 2020 at 02:16:56PM -0700, Randy Dunlap wrote:
>> On 10/21/20 2:15 PM, Brendan Higgins wrote:
>>> On Tue, Oct 20, 2020 at 12:37 AM Geert Uytterhoeven
>>> <geert@...ux-m68k.org> wrote:
>>>>
>>>> EXT4_KUNIT_TESTS selects EXT4_FS, thus enabling an optional feature the
>>>> user may not want to enable.  Fix this by making the test depend on
>>>> EXT4_FS instead.
>>>>
>>>> Fixes: 1cbeab1b242d16fd ("ext4: add kunit test for decoding extended timestamps")
>>>> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
>>>
>>> If I remember correctly, having EXT4_KUNIT_TESTS select EXT4_FS was
>>> something that Ted specifically requested, but I don't have any strong
>>> feelings on it either way.
>>
>> omg, please No. depends on is the right fix here.
> 
> So my requirement which led to that particular request is to keep what
> needs to be placed in .kunitconfig to a small and reasonable set.
> 
> Per Documentation/dev-tools/kunit, we start by:
> 
>     cd $PATH_TO_LINUX_REPO
>     cp arch/um/configs/kunit_defconfig .kunitconfig
> 
> we're then supposed to add whatever Kunit tests we want to enable, to wit:
> 
> CONFIG_EXT4_KUNIT_TESTS=y
> 
> so that .kunitconfig would look like this:
> 
> CONFIG_KUNIT=y
> CONFIG_KUNIT_TEST=y
> CONFIG_KUNIT_EXAMPLE_TEST=y
> CONFIG_EXT4_KUNIT_TESTS=y
> 
> ... and then you should be able to run:
> 
> ./tools/testing/kunit/kunit.py run
> 
> ... and have the kunit tests run.  I would *not* like to have to put a
> huge long list of CONFIG_* dependencies into the .kunitconfig file.
> 
> I'm don't particularly care how this gets achieved, but please think
> about how to make it easy for a kernel developer to run a specific set
> of subsystem unit tests.  (In fact, being able to do something like
> "kunit.py run fs/ext4 fs/jbd2" or maybe "kunit.py run fs/..." would be
> *great*.  No need to fuss with hand editing the .kunitconfig file at
> all would be **wonderful**.

I understand the wish for ease of use, but this is still the tail
wagging the dog.

The primary documentation for 'select' is
Documentation/kbuild/kconfig-language.rst, which says:

  Note:
	select should be used with care. select will force
	a symbol to a value without visiting the dependencies.
	By abusing select you are able to select a symbol FOO even
	if FOO depends on BAR that is not set.
	In general use select only for non-visible symbols
	(no prompts anywhere) and for symbols with no dependencies.
	That will limit the usefulness but on the other hand avoid
	the illegal configurations all over.


-- 
~Randy

Powered by blists - more mailing lists