linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Maguire <alan.maguire@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Alan Maguire <alan.maguire@oracle.com>, shuah <shuah@kernel.org>,
	brendanhiggins@google.com, frowand.list@gmail.com,
	linux-kselftest@vger.kernel.org, corbet@lwn.net,
	linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH v8 kunit-next 1/4] kunit: add debugfs /sys/kernel/debug/kunit/<suite>/results display
Date: Fri, 3 Apr 2020 12:58:21 +0100 (BST)	[thread overview]
Message-ID: <alpine.LRH.2.21.2004031255450.5001@localhost> (raw)
In-Reply-To: <20200402183839.GB3234477@kroah.com>

On Thu, 2 Apr 2020, Greg KH wrote:

> On Thu, Apr 02, 2020 at 04:27:35PM +0100, Alan Maguire wrote:
> > On Wed, 1 Apr 2020, shuah wrote:
> > 
> > > Hi Alan,
> > > 
> > > On 3/26/20 8:25 AM, Alan Maguire wrote:
> > > > add debugfs support for displaying kunit test suite results; this is
> > > > especially useful for module-loaded tests to allow disentangling of
> > > > test result display from other dmesg events.  debugfs support is
> > > > provided if CONFIG_KUNIT_DEBUGFS=y.
> > > > 
> > > > As well as printk()ing messages, we append them to a per-test log.
> > > > 
> > > > Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> > > > Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
> > > > Reviewed-by: Frank Rowand <frank.rowand@sony.com>
> > > > ---
> > > >   include/kunit/test.h   |  54 +++++++++++++++---
> > > >   lib/kunit/Kconfig      |   8 +++
> > > 
> > > Missing defaults for config options?
> > > 
> > > >   lib/kunit/Makefile     |   4 ++
> > > >   lib/kunit/debugfs.c    | 116 ++++++++++++++++++++++++++++++++++++++
> > > >   lib/kunit/debugfs.h    |  30 ++++++++++
> > > >   lib/kunit/kunit-test.c |   4 +-
> > > >   lib/kunit/test.c       | 147
> > > >   ++++++++++++++++++++++++++++++++++++++-----------
> > > >   7 files changed, 322 insertions(+), 41 deletions(-)
> > > >   create mode 100644 lib/kunit/debugfs.c
> > > >   create mode 100644 lib/kunit/debugfs.h
> > > > 
> > > 
> > > snip
> > > 
> > > > diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig
> > > > index 065aa16..95d12e3 100644
> > > > --- a/lib/kunit/Kconfig
> > > > +++ b/lib/kunit/Kconfig
> > > > @@ -14,6 +14,14 @@ menuconfig KUNIT
> > > >   
> > > >   if KUNIT
> > > >   
> > > > +config KUNIT_DEBUGFS
> > > > +	bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation"
> > > > +	help
> > > > +	  Enable debugfs representation for kunit.  Currently this consists
> > > > +	  of /sys/kernel/debug/kunit/<test_suite>/results files for each
> > > > +	  test suite, which allow users to see results of the last test suite
> > > > +	  run that occurred.
> > > > +
> > > 
> > > Any reason why there is default for this option?
> > > 
> > > Same for all other options. I am sending pull request for now without
> > > defaults. Would like to see this fixed for rc2.
> > >
> > 
> > Sure, I'll send a patch shortly. Just wanted to get opinions
> > on what those defaults should be; my working assumption is
> > 
> > - CONFIG_KUNIT should be default n; 
> 
> No default means 'n', so there's no need to say that at all.
> 

Great!

> > - CONFIG_KUNIT_DEBUGFS should be default y (enabled by default
> >   if CONFIG_KUNIT is set);
> 
> Why?  If it's is 'y', then don't even make it an option at all, just
> always have it :)
> 
> 'y' is almost always reserved for "your machine will not function
> properly without this enabled".
>

Okay, so in this case not having a default makes sense I think
(we added the option as saying 'n' avoids allocating per-test
loggging memory which might cause problems on low-memory systems).

> > - CONFIG_KUNIT_TEST, CONFIG_KUNIT_EXAMPLE_TEST should be default n
> 
> So no need to specify anything, 'n' is the default.
>

Excellent! So based on the above seems like we don't need
to add any defaults here I think.  Shuah/Brendan, let me know
if I'm missing anything here. Thanks!

Alan

> thanks,
> 
> greg k-h
> 

  reply	other threads:[~2020-04-03 11:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 14:25 [PATCH v8 kunit-next 0/4] kunit: add debugfs representation to show results Alan Maguire
2020-03-26 14:25 ` [PATCH v8 kunit-next 1/4] kunit: add debugfs /sys/kernel/debug/kunit/<suite>/results display Alan Maguire
2020-04-01 17:47   ` shuah
2020-04-02 15:27     ` Alan Maguire
2020-04-02 18:38       ` Greg KH
2020-04-03 11:58         ` Alan Maguire [this message]
2020-04-15 17:58   ` Marco Elver
2020-03-26 14:25 ` [PATCH v8 kunit-next 2/4] kunit: add log test Alan Maguire
2020-03-26 14:25 ` [PATCH v8 kunit-next 3/4] kunit: subtests should be indented 4 spaces according to TAP Alan Maguire
2020-03-26 14:25 ` [PATCH v8 kunit-next 4/4] kunit: update documentation to describe debugfs representation Alan Maguire
2020-03-26 20:14 ` [PATCH v8 kunit-next 0/4] kunit: add debugfs representation to show results shuah

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=alpine.LRH.2.21.2004031255450.5001@localhost \
    --to=alan.maguire@oracle.com \
    --cc=brendanhiggins@google.com \
    --cc=corbet@lwn.net \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    /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 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).