linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
From: Vitor Massaru Iha <vitor@massaru.org>
To: Marco Elver <elver@google.com>
Cc: mhocko@suse.com, arnd@arndb.de, torvalds@linux-foundation.org,
	Brendan Higgins <brendanhiggins@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	elfring@users.sourceforge.net, paul.gortmaker@windriver.com,
	geert@linux-m68k.org,
	"open list:KERNEL SELFTEST FRAMEWORK"
	<linux-kselftest@vger.kernel.org>,
	tglx@linutronix.de,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel-mentees@lists.linuxfoundation.org,
	akpm@linux-foundation.org,
	KUnit Development <kunit-dev@googlegroups.com>
Subject: Re: [Linux-kernel-mentees] [PATCH] lib: kunit: add list_sort test conversion to KUnit
Date: Thu, 27 Aug 2020 07:53:53 -0300	[thread overview]
Message-ID: <CADQ6JjVzx=kPsF4Lcek1HtGU7bGW3H62UoN0XDUHDrTxKt3FVg@mail.gmail.com> (raw)
In-Reply-To: <20200827102333.GA3564678@elver.google.com>

On Thu, Aug 27, 2020 at 7:23 AM Marco Elver <elver@google.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@massaru.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.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

      reply	other threads:[~2020-08-27 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 19:23 Vitor Massaru Iha
2020-08-19 21:14 ` Brendan Higgins via Linux-kernel-mentees
2020-08-27 10:23 ` Marco Elver via Linux-kernel-mentees
2020-08-27 10:53   ` Vitor Massaru Iha [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADQ6JjVzx=kPsF4Lcek1HtGU7bGW3H62UoN0XDUHDrTxKt3FVg@mail.gmail.com' \
    --to=vitor@massaru.org \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=brendanhiggins@google.com \
    --cc=elfring@users.sourceforge.net \
    --cc=elver@google.com \
    --cc=geert@linux-m68k.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [Linux-kernel-mentees] [PATCH] lib: kunit: add list_sort test conversion to KUnit' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).