All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gow <davidgow@google.com>
To: Anders Roxell <anders.roxell@linaro.org>
Cc: Brendan Higgins <brendanhiggins@google.com>,
	John Johansen <john.johansen@canonical.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	"Theodore Ts'o" <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	KUnit Development <kunit-dev@googlegroups.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-ext4@vger.kernel.org,
	linux-security-module <linux-security-module@vger.kernel.org>,
	Marco Elver <elver@google.com>
Subject: Re: [PATCH v2 1/6] kunit: Kconfig: enable a KUNIT_RUN_ALL fragment
Date: Thu, 7 May 2020 11:08:10 +0800	[thread overview]
Message-ID: <CABVgOSndkMOd0U+p=fMy0q-KdN29XERheY=3-3+dgVoeWf9m5g@mail.gmail.com> (raw)
In-Reply-To: <CADYN=9Jdwd=3Rh=wyzO7eOxtyTSm+JqjF385iQjfMocpz1A3YA@mail.gmail.com>

On Wed, May 6, 2020 at 6:33 PM Anders Roxell <anders.roxell@linaro.org> wrote:
>
> Hi David,
>
> Thank you for the review.
>
> On Wed, 6 May 2020 at 07:08, David Gow <davidgow@google.com> wrote:
> >
> > On Tue, May 5, 2020 at 6:27 PM Anders Roxell <anders.roxell@linaro.org> wrote:
> > >
> > > Make it easier to enable all KUnit fragments.  This is needed for kernel
> > > test-systems, so its easy to get all KUnit tests enabled and if new gets
> > > added they will be enabled as well.  Fragments that has to be builtin
> > > will be missed if CONFIG_KUNIT_RUN_ALL is set as a module.
> > >
> > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> > > ---
> > >  lib/kunit/Kconfig | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> > >
> > > diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig
> > > index 95d12e3d6d95..537f37bc8400 100644
> > > --- a/lib/kunit/Kconfig
> > > +++ b/lib/kunit/Kconfig
> > > @@ -41,4 +41,10 @@ config KUNIT_EXAMPLE_TEST
> > >           is intended for curious hackers who would like to understand how to
> > >           use KUnit for kernel development.
> > >
> > > +config KUNIT_RUN_ALL
> > > +       tristate "KUnit run all test"
> >
> > I'm not 100% sure about this name and description. It only actually
> > "runs" the tests if they're builtin (as modules, they'll only run when
> > loaded).
> >
> > Would KUNIT_BUILD_ALL or KUNIT_ALL_TESTS
>
> I would like to go with KUNIT_ALL_TESTS if no one objects.
>

Personally, I'm fine with that.

Brendan, thoughts?

> > or similar be better?
> >
> > It also, as mentioned, only really runs all available (i.e., with
> > dependencies met in the current .config) tests (as distinct from the
> > --alltests flag to kunit.py, which builds UML with allyesconfig), it
> > might be good to add this to the description or help.
> >
> > Something like "Enable all KUnit tests" or "Enable all available KUnit
> > tests" (or even something about "all KUnit tests with satisfied
> > dependencies") might be clearer.
>
> I like "All KUnit tests with satisfied dependencies".
>
> >
> > > +       help
> > > +         Enables all KUnit tests, if they can be enabled.
> > > +         That depends on if KUnit is enabled as a module or builtin.
> > > +
> > I like the first line here, but the second one could use a bit more
> > explanation. Maybe copy some of the boilerplate text from other tests,
> > e.g.:
> >
> >           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.
> >
> >          For more information on KUnit and unit tests in general please refer
> >          to the KUnit documentation in Documentation/dev-tools/kunit/.
> >
> >          If unsure, say N.
>
> Makes much more sense, thanks.
>
> >
> > >  endif # KUNIT
> > > --
> > > 2.20.1
> > >
> >
> > Otherwise, this is looking good. I've done some quick testing, and it
> > all seems to work for me. As long as it's clear what the difference
> > between this and other ways of running "all tests" (like the
> > --alltests kunit.py option),
>
> Do you think it should be made clearer in some way?
>

I think the changes above should do it.

-- David

      reply	other threads:[~2020-05-07  3:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 10:27 [PATCH v2 1/6] kunit: Kconfig: enable a KUNIT_RUN_ALL fragment Anders Roxell
2020-05-06  5:08 ` David Gow
2020-05-06 10:33   ` Anders Roxell
2020-05-07  3:08     ` David Gow [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='CABVgOSndkMOd0U+p=fMy0q-KdN29XERheY=3-3+dgVoeWf9m5g@mail.gmail.com' \
    --to=davidgow@google.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=akpm@linux-foundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=brendanhiggins@google.com \
    --cc=elver@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=tytso@mit.edu \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.