linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brendan Higgins <brendanhiggins@google.com>
To: David Gow <davidgow@google.com>
Cc: "Sadiya Kazi" <sadiyakazi@google.com>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Maíra Canal" <mairacanal@riseup.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>
Subject: Re: [PATCH v2] Documentation: kunit: Add CLI args for kunit_tool
Date: Thu, 21 Jul 2022 20:24:50 -0400	[thread overview]
Message-ID: <CAFd5g46ssneHhqg8uXSZZ0=GP8DyqYq2xvQp5tK+cuUV2aVbrA@mail.gmail.com> (raw)
In-Reply-To: <CABVgOS=iOkquTXEPdS1skRj7Bda-H-REDW8mozziEYjn8RnRnw@mail.gmail.com>

On Thu, Jul 21, 2022 at 7:54 PM David Gow <davidgow@google.com> wrote:
>
> On Thu, Jul 21, 2022 at 4:26 PM Sadiya Kazi <sadiyakazi@google.com> wrote:

[...]

> >  Documentation/dev-tools/kunit/run_wrapper.rst | 60 ++++++++++++++++++-
> >  1 file changed, 59 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/dev-tools/kunit/run_wrapper.rst b/Documentation/dev-tools/kunit/run_wrapper.rst
> > index 5e560f2c5fca..600af7ac5f88 100644
> > --- a/Documentation/dev-tools/kunit/run_wrapper.rst
> > +++ b/Documentation/dev-tools/kunit/run_wrapper.rst

[...]

> > @@ -257,3 +257,61 @@ command line arguments:
> >              added or modified. Instead, enable all tests
> >              which have satisfied dependencies by adding
> >              ``CONFIG_KUNIT_ALL_TESTS=y`` to your ``.kunitconfig``.
> > +
> > +- ``--kunitconfig``: Specifies the path or the directory of the ``.kunitconfig``
> > +  file. For example:
> > +
> > +  - ``lib/kunit/.kunitconfig`` can be the path of the file.
> > +
> > +  - ``lib/kunit`` can be the directory in which the file is located.
> > +
> > +  This file is used to build and run with a predefined set of tests
> > +  and their dependencies. For example, to run tests for a given subsystem.
> > +
> > +- ``--kconfig_add``: Specifies additional configuration options to be
> > +  appended to the ``.kunitconfig`` file.
> > +  For example, ``./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_KASAN=y``.
> > +
>
> Just FYI, this example won't work as-is until KASAN for UML is merged.
> It's already sitting in uml/next, so this shouldn't be a problem:
> https://git.kernel.org/pub/scm/linux/kernel/git/uml/linux.git/commit/?h=next&id=5b301409e8bc5d7fad2ee138be44c5c529dd0874
>
> But if you want to try it on 5.19 or the current kunit branch, you'll
> need to add, e.g., --arch=x86_64
>
> > +- ``--arch``: Runs tests on the specified architecture. The architecture
> > +  specified must match the Kbuild ARCH environment variable.
>
> I'm not quite sold on 'must match the Kbuild ARCH environment
> variable'. That seems to imply to me that you need to set ARCH= _and_
> use --arch. Instead, --arch itself sets ARCH=, so the values use the
> same names.

Agreed, I was just about to reply with a comment to the same effect.

> > +  For example, i386, x86_64, arm, um, etc. Non-UML architectures run on QEMU.
> > +  Default is `um`.
> > +
> > +- ``--cross_compile``: Specifies the Kbuild toolchain. It passes the
> > +  same argument as passed to the ``CROSS_COMPILE`` variable used by
> > +  Kbuild. This will be the prefix for the toolchain
> > +  binaries such as GCC. For example:
> > +
> > +  - ``sparc64-linux-gnu-`` if we have the sparc toolchain installed on
> > +    our system.
> > +
> > +  - ``$HOME/toolchains/microblaze/gcc-9.2.0-nolibc/microblaze-linux/bin/microblaze-linux``
> > +    if we have downloaded the microblaze toolchain from the 0-day
> > +    website to a specified path in our home directory called toolchains.
> > +
> > +- ``--qemu_config``: Specifies the path to a file containing a
> > +  custom qemu architecture definition. This should be a python file
> > +  containing a `QemuArchParams` object.
> > +
> > +- ``--qemu_args``: Specifies additional QEMU arguments, for example, "-smp 8".
> > +
> > +- ``--jobs``: Specifies the number of jobs (commands) to run simultaneously.4
> > +  By default, this is set to the number of cores on your system.
> > +
> > +- ``--timeout``: Specifies the maximum number of seconds allowed for all tests to run.
> > +  This does not include the time taken to build the tests.
> > +
> > +- ``--kernel_args``: Specifies additional kernel command-line arguments. Might be repeated.
>
> Nit: maybe "can be repeated"? As it's the reader of this documentation
> who will likely be doing the repeating. Or "may be repeated"?

+1

[...]

  reply	other threads:[~2022-07-22  0:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21  8:10 [PATCH v2] Documentation: kunit: Add CLI args for kunit_tool Sadiya Kazi
2022-07-21 11:08 ` Maíra Canal
2022-07-21 23:54 ` David Gow
2022-07-22  0:24   ` Brendan Higgins [this message]
2022-07-22  0:27 ` Brendan Higgins
2022-07-22  0:54 ` Daniel Latypov

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='CAFd5g46ssneHhqg8uXSZZ0=GP8DyqYq2xvQp5tK+cuUV2aVbrA@mail.gmail.com' \
    --to=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=mairacanal@riseup.net \
    --cc=sadiyakazi@google.com \
    --cc=skhan@linuxfoundation.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).