linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj38.park@gmail.com>
To: David Gow <davidgow@google.com>
Cc: Brendan Higgins <brendanhiggins@google.com>,
	shuah <shuah@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	KUnit Development <kunit-dev@googlegroups.com>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	SeongJae Park <sjpark@amazon.de>
Subject: Re: [PATCH 2/6] docs/kunit/start: Skip wrapper run command
Date: Mon, 2 Dec 2019 22:09:49 +0100	[thread overview]
Message-ID: <CAEjAshqVQNwQo+yiAYhKXC0k=ZHx2MKZAB90hO2PLw9STMZ8=w@mail.gmail.com> (raw)
In-Reply-To: <CABVgOS=xYiqVNND3JxgRLPv--0ZNC+h=FB0oZc2sKmVk4HJ95A@mail.gmail.com>

On Mon, Dec 2, 2019 at 10:03 PM David Gow <davidgow@google.com> wrote:
>
> On Mon, Dec 2, 2019 at 9:25 AM Brendan Higgins
> <brendanhiggins@google.com> wrote:
> >
> > +David Gow - David has lots of good opinions on our documentation.
> >
> > On Sun, Dec 1, 2019 at 3:25 PM SeongJae Park <sj38.park@gmail.com> wrote:
> > >
> > > From: SeongJae Park <sjpark@amazon.de>
> > >
> > > The kunit 'Getting Started' document first shows the wrapper running
> > > command.  However, a new user who simply following the command might
> > > encounter a failure like below:
> > >
> > >     $ ./tools/testing/kunit/kunit.py run
> > >     Traceback (most recent call last):
> > >       File "./tools/testing/kunit/kunit.py", line 140, in <module>
> > >         main(sys.argv[1:])
> > >       File "./tools/testing/kunit/kunit.py", line 126, in main
> > >         linux = kunit_kernel.LinuxSourceTree()
> > >       File "/home/sjpark/linux/tools/testing/kunit/kunit_kernel.py", line 85, in __init__
> > >         self._kconfig.read_from_file(KUNITCONFIG_PATH)
> > >       File "/home/sjpark/linux/tools/testing/kunit/kunit_config.py", line 65, in read_from_file
> > >         with open(path, 'r') as f:
> > >     FileNotFoundError: [Errno 2] No such file or directory: 'kunitconfig'
> > >
> > > Though the reason of the failure ('kunitconfig') is explained in its
> > > next section, it would be better to reduce any failure that user might
> > > encounter.  This commit removes the example command for the reason.
> >
> > Seems reasonable.
> >
> I definitely agree that having a non-working command here is doing
> more harm than good. Whether we just get rid of it, or change it to
> use the --defconfig option is a matter of taste. (Personally, I think
> there's some value in having a one-line "run the tests" command at the
> top of the Getting Started page, but it definitely needs to be one
> that works.)
>
> So, overall, I think this is definitely an improvement, but that we do
> need to choose whether to take this approach (deleting this command)
> or the --defconfig approach as in:
> https://lore.kernel.org/linux-kselftest/20191119003120.154041-1-brendanhiggins@google.com/
>
> > > Signed-off-by: SeongJae Park <sjpark@amazon.de>
> > > ---
> > >  Documentation/dev-tools/kunit/start.rst | 6 ------
> > >  1 file changed, 6 deletions(-)
> > >
> > > diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
> > > index 78a0aed..e25978d 100644
> > > --- a/Documentation/dev-tools/kunit/start.rst
> > > +++ b/Documentation/dev-tools/kunit/start.rst
> > > @@ -15,12 +15,6 @@ Included with KUnit is a simple Python wrapper that helps format the output to
> > >  easily use and read KUnit output. It handles building and running the kernel, as
> > >  well as formatting the output.
> > >
> > > -The wrapper can be run with:
> > > -
> > > -.. code-block:: bash
> > > -
> > > -   ./tools/testing/kunit/kunit.py run
> > > -
> > >  Creating a kunitconfig
> > >  ======================
> >
> > I think maybe we should demote this section so that this is a
> > subsection under KUnit Wrapper. Might also want to add a tie-in
> > explaining why we are talking about kunitconfig here? Right now this
> > kind of reads as a non sequitur.
> I generally think we want to keep the "Getting Started" guide focused
> on the goal (running/writing tests), rather than too much detail on
> the implementation (the wrapper itself).
> How about renaming what's currently the "KUnit Wrapper" section to
> "Running tests" or similar, and moving the kunitconfig part under
> that?
>
> The "Creating a kunitconfig" part could equally be "configuring which
> tests to run" or something, which may speak more to motivating
>
> As for some sort of tie-in, perhaps rewording the opening sentence to
> say "The easiest way to run tests is to use the kunit_tool script",
> and link to the page kunit_tool page in the patch below?
> >
> > Note: we have tried to address this potential issue for new users in
> > this patch under review:
> >
> > https://patchwork.kernel.org/patch/11252953/
> >
> > I don't feel strongly whether we do it your way or my way. What do
> > other people think?
>
> As above, my slight preference is for adding the --defconfig option
> over removing the section entirely.

Agree, I would also prefer to do explain about '--defconfig' option.

Thanks,
SeongJae Park

>
> > >  The Python script is a thin wrapper around Kbuild as such, it needs to be
> > > --
> > > 2.7.4
> > >
> On Mon, Dec 2, 2019 at 9:25 AM Brendan Higgins
> <brendanhiggins@google.com> wrote:
> >
> > +David Gow - David has lots of good opinions on our documentation.
> >
> > On Sun, Dec 1, 2019 at 3:25 PM SeongJae Park <sj38.park@gmail.com> wrote:
> > >
> > > From: SeongJae Park <sjpark@amazon.de>
> > >
> > > The kunit 'Getting Started' document first shows the wrapper running
> > > command.  However, a new user who simply following the command might
> > > encounter a failure like below:
> > >
> > >     $ ./tools/testing/kunit/kunit.py run
> > >     Traceback (most recent call last):
> > >       File "./tools/testing/kunit/kunit.py", line 140, in <module>
> > >         main(sys.argv[1:])
> > >       File "./tools/testing/kunit/kunit.py", line 126, in main
> > >         linux = kunit_kernel.LinuxSourceTree()
> > >       File "/home/sjpark/linux/tools/testing/kunit/kunit_kernel.py", line 85, in __init__
> > >         self._kconfig.read_from_file(KUNITCONFIG_PATH)
> > >       File "/home/sjpark/linux/tools/testing/kunit/kunit_config.py", line 65, in read_from_file
> > >         with open(path, 'r') as f:
> > >     FileNotFoundError: [Errno 2] No such file or directory: 'kunitconfig'
> > >
> > > Though the reason of the failure ('kunitconfig') is explained in its
> > > next section, it would be better to reduce any failure that user might
> > > encounter.  This commit removes the example command for the reason.
> >
> > Seems reasonable.
> >
> > > Signed-off-by: SeongJae Park <sjpark@amazon.de>
> > > ---
> > >  Documentation/dev-tools/kunit/start.rst | 6 ------
> > >  1 file changed, 6 deletions(-)
> > >
> > > diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
> > > index 78a0aed..e25978d 100644
> > > --- a/Documentation/dev-tools/kunit/start.rst
> > > +++ b/Documentation/dev-tools/kunit/start.rst
> > > @@ -15,12 +15,6 @@ Included with KUnit is a simple Python wrapper that helps format the output to
> > >  easily use and read KUnit output. It handles building and running the kernel, as
> > >  well as formatting the output.
> > >
> > > -The wrapper can be run with:
> > > -
> > > -.. code-block:: bash
> > > -
> > > -   ./tools/testing/kunit/kunit.py run
> > > -
> > >  Creating a kunitconfig
> > >  ======================
> >
> > I think maybe we should demote this section so that this is a
> > subsection under KUnit Wrapper. Might also want to add a tie-in
> > explaining why we are talking about kunitconfig here? Right now this
> > kind of reads as a non sequitur.
> >
> > Note: we have tried to address this potential issue for new users in
> > this patch under review:
> >
> > https://patchwork.kernel.org/patch/11252953/
> >
> > I don't feel strongly whether we do it your way or my way. What do
> > other people think?
> >
> > >  The Python script is a thin wrapper around Kbuild as such, it needs to be
> > > --
> > > 2.7.4
> > >

  reply	other threads:[~2019-12-02 21:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-01 23:25 [PATCH 0/6] Fix nits in the kunit SeongJae Park
2019-12-01 23:25 ` [PATCH 1/6] docs/kunit/start: Use in-tree 'kunit_defconfig' SeongJae Park
2019-12-02 17:13   ` Brendan Higgins
2019-12-01 23:25 ` [PATCH 2/6] docs/kunit/start: Skip wrapper run command SeongJae Park
2019-12-02 17:25   ` Brendan Higgins
2019-12-02 20:59     ` SeongJae Park
2019-12-03  8:27       ` SeongJae Park
2019-12-02 21:03     ` David Gow
2019-12-02 21:09       ` SeongJae Park [this message]
2019-12-01 23:25 ` [PATCH 3/6] kunit: Remove duplicated defconfig creation SeongJae Park
2019-12-02 17:27   ` Brendan Higgins
2019-12-01 23:25 ` [PATCH 4/6] kunit: Create default config in 'build_dir' SeongJae Park
2019-12-03  6:40   ` Brendan Higgins
2019-12-03  8:28     ` SeongJae Park
2019-12-01 23:25 ` [PATCH 5/6] kunit: Place 'test.log' under the 'build_dir' SeongJae Park
2019-12-03  6:48   ` Brendan Higgins
2019-12-01 23:25 ` [PATCH 6/6] kunit: Rename 'kunitconfig' to '.kunitconfig' SeongJae Park
2019-12-03  7:00 ` [PATCH 0/6] Fix nits in the kunit Brendan Higgins
2019-12-03  7:10   ` SeongJae Park
2019-12-03  8:25     ` SeongJae Park
2019-12-03 17:45       ` Brendan Higgins
2019-12-03 18:10         ` SeongJae Park
2019-12-03 22:35           ` Brendan Higgins

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='CAEjAshqVQNwQo+yiAYhKXC0k=ZHx2MKZAB90hO2PLw9STMZ8=w@mail.gmail.com' \
    --to=sj38.park@gmail.com \
    --cc=brendanhiggins@google.com \
    --cc=corbet@lwn.net \
    --cc=davidgow@google.com \
    --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 \
    --cc=sjpark@amazon.de \
    /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).