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: <CADQ6JjVzx=kPsF4Lcek1HtGU7bGW3H62UoN0XDUHDrTxKt3FVg@mail.gmail.com>
Date:   Thu, 27 Aug 2020 07:53:53 -0300
From:   Vitor Massaru Iha <vitor@...saru.org>
To:     Marco Elver <elver@...gle.com>
Cc:     KUnit Development <kunit-dev@...glegroups.com>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        Shuah Khan <skhan@...uxfoundation.org>,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        tglx@...utronix.de,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        geert@...ux-m68k.org, paul.gortmaker@...driver.com,
        akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
        arnd@...db.de, elfring@...rs.sourceforge.net, mhocko@...e.com
Subject: Re: [PATCH] lib: kunit: add list_sort test conversion to KUnit

On Thu, Aug 27, 2020 at 7:23 AM Marco Elver <elver@...gle.com> wrote:
>
> On Wed, Jul 29, 2020 at 04:23PM -0300, Vitor Massaru Iha wrote:
> > This adds the conversion of the runtime tests of test_list_sort,
> > from `lib/test_list_sort.c` to KUnit tests.
> >
> > Please apply this commit first (linux-kselftest/kunit-fixes):
> > 3f37d14b8a3152441f36b6bc74000996679f0998 kunit: kunit_config: Fix parsing of CONFIG options with space
> >
> > Code Style Documentation: [0]
> >
> > Signed-off-by: Vitor Massaru Iha <vitor@...saru.org>
> > Link: [0] https://lore.kernel.org/linux-kselftest/20200620054944.167330-1-davidgow@google.com/T/#u
> > ---
> >  lib/Kconfig.debug                           | 29 +++++---
> >  lib/Makefile                                |  2 +-
> >  lib/{test_list_sort.c => list_sort_kunit.c} | 73 +++++++++++----------
> >  3 files changed, 58 insertions(+), 46 deletions(-)
> >  rename lib/{test_list_sort.c => list_sort_kunit.c} (62%)
> >
> > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > index 9ad9210d70a1..de4fd020a4af 100644
> > --- a/lib/Kconfig.debug
> > +++ b/lib/Kconfig.debug
> > @@ -1854,16 +1854,6 @@ config LKDTM
> >       Documentation on how to use the module can be found in
> >       Documentation/fault-injection/provoke-crashes.rst
> >
> > -config TEST_LIST_SORT
> > -     tristate "Linked list sorting test"
> > -     depends on DEBUG_KERNEL || m
> > -     help
> > -       Enable this to turn on 'list_sort()' function test. This test is
> > -       executed only once during system boot (so affects only boot time),
> > -       or at module load time.
> > -
> > -       If unsure, say N.
> > -
> >  config TEST_MIN_HEAP
> >       tristate "Min heap test"
> >       depends on DEBUG_KERNEL || m
> > @@ -2173,6 +2163,25 @@ config LIST_KUNIT_TEST
> >
> >         If unsure, say N.
> >
> > +config LIST_SORT_KUNIT
> > +     tristate "KUnit Linked list sorting test"
> > +     depends on KUNIT
> > +     depends on DEBUG_KERNEL || m
>
> I think the style [0] you linked suggests '*_KUNIT_TEST' for config
> variables.
>
> Only noticed this because I was doing a
>
>         git grep 'config.*TEST'
>
> to find tests in the kernel + new tests floating on the LKML.

Thanks, I'll fix it.

>
> Apologies for picking this patch to comment on, but if it's still
> changeable it might be worth adjusting.

No problem.


> > +     help
> > +       Enable this to turn on 'list_sort()' function test. This test is
> > +       executed only once during system boot (so affects only boot time),
> > +       or at module load time.
> > +
> > +          KUnit tests run during boot and output the results to the debug log
> > +       in TAP format (http://testanything.org/). Only useful for kernel devs
> > +       running the KUnit test harness, and not intended for inclusion into a
> > +       production build.
>
> Not a big deal, but I'm not sure if summarizing KUnit here is useful.
> You already link to the documentation below.

Sure, I'll remove this.

> > +       For more information on KUnit and unit tests in general please refer
> > +       to the KUnit documentation in Documentation/dev-tools/kunit/.
> ...
>
> Thanks,
> -- Marco

Thanks for the review.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ