From: Harinder Singh <sharinder@google.com>
To: tim.bird@sony.com
Cc: davidgow@google.com, brendanhiggins@google.com, shuah@kernel.org,
corbet@lwn.net, linux-kselftest@vger.kernel.org,
kunit-dev@googlegroups.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/7] Documentation: kunit: Reorganize documentation related to running tests
Date: Fri, 10 Dec 2021 11:01:32 +0530 [thread overview]
Message-ID: <CAHLZCaE5XLcrLrN5xEETfE3eKS8K4p5oQgAWSoqLJWm9WK7XLg@mail.gmail.com> (raw)
In-Reply-To: <BYAPR13MB2503F47AA79D51CDE321AB21FD6E9@BYAPR13MB2503.namprd13.prod.outlook.com>
Hello Tim,
Thanks for your comments.
See my comments below.
On Tue, Dec 7, 2021 at 11:03 PM <Tim.Bird@sony.com> wrote:
>
> > -----Original Message-----
> > From: Harinder Singh <sharinder@google.com>
> >
> > Consolidate documentation running tests into two pages: "run tests with
> > kunit_tool" and "run tests without kunit_tool".
> >
> > Signed-off-by: Harinder Singh <sharinder@google.com>
> > ---
> > Documentation/dev-tools/kunit/index.rst | 4 +
> > Documentation/dev-tools/kunit/run_manual.rst | 57 ++++
> > Documentation/dev-tools/kunit/run_wrapper.rst | 247 ++++++++++++++++++
> > Documentation/dev-tools/kunit/start.rst | 4 +-
> > 4 files changed, 311 insertions(+), 1 deletion(-)
> > create mode 100644 Documentation/dev-tools/kunit/run_manual.rst
> > create mode 100644 Documentation/dev-tools/kunit/run_wrapper.rst
> >
> > diff --git a/Documentation/dev-tools/kunit/index.rst b/Documentation/dev-tools/kunit/index.rst
> > index 75e4ae85adbb..c0d1fd749cd2 100644
> > --- a/Documentation/dev-tools/kunit/index.rst
> > +++ b/Documentation/dev-tools/kunit/index.rst
> > @@ -10,6 +10,8 @@ KUnit - Linux Kernel Unit Testing
> >
> > start
> > architecture
> > + run_wrapper
> > + run_manual
> > usage
> > kunit-tool
> > api/index
> > @@ -98,6 +100,8 @@ How do I use it?
> >
> > * Documentation/dev-tools/kunit/start.rst - for KUnit new users.
> > * Documentation/dev-tools/kunit/architecture.rst - KUnit architecture.
> > +* Documentation/dev-tools/kunit/run_wrapper.rst - run kunit_tool.
> > +* Documentation/dev-tools/kunit/run_manual.rst - run tests without kunit_tool.
> > * Documentation/dev-tools/kunit/usage.rst - KUnit features.
> > * Documentation/dev-tools/kunit/tips.rst - best practices with
> > examples.
> > diff --git a/Documentation/dev-tools/kunit/run_manual.rst b/Documentation/dev-tools/kunit/run_manual.rst
> > new file mode 100644
> > index 000000000000..71e6d6623f88
> > --- /dev/null
> > +++ b/Documentation/dev-tools/kunit/run_manual.rst
> > @@ -0,0 +1,57 @@
> > +.. SPDX-License-Identifier: GPL-2.0
> > +
> > +============================
> > +Run Tests without kunit_tool
> > +============================
> > +
> > +If we do not want to use kunit_tool (For example: we want to integrate
> > +with other systems, or run tests on real hardware), we can
> > +include KUnit in any kernel, read out results, and parse manually.
> > +
> > +.. note:: KUnit is not designed for use in a production system. It is
> > + possible that tests may reduce the stability or security of
> > + the system.
> > +
> > +Configure the Kernel
> > +====================
> > +
> > +KUnit tests can run without kunit_tool. This can be useful, if:
> > +
> > +- We have an existing kernel configuration to test.
> > +- Need to run on real hardware (or using an emulator/VM kunit_tool
> > + does not support).
> > +- Wish to integrate with some existing testing systems.
> > +
> > +KUnit is configured with the ``CONFIG_KUNIT`` option, and individual
> > +tests can also be built by enabling their config options in our
> > +``.config``. KUnit tests usually (but don't always) have config options
> > +ending in ``_KUNIT_TEST``. Most tests can either be built as a module,
> > +or be built into the kernel.
> > +
> > +.. note ::
> > +
> > + We can enable the ``KUNIT_ALL_TESTS`` config option to
> > + automatically enable all tests with satisfied dependencies. This is
> > + a good way of quickly testing everything applicable to the current
> > + config.
> > +
> > +Once we have built our kernel (and/or modules), it is simple to run
> > +the tests. If the tests are built-in, then will run automatically on the
>
> then will run -> they will run
> (or 'then they will run')
>
Done
> > +kernel boot. The results will be written to the kernel log (``dmesg``)
> > +in TAP format.
> > +
>
> The rest looks OK to me.
>
> You can add a 'Reviewed-by' for me if you want.
> -- Tim
>
Regards,
Harinder Singh
next prev parent reply other threads:[~2021-12-10 5:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 5:40 [PATCH v2 0/7] Documentation: KUnit: Rework KUnit documentation Harinder Singh
2021-12-07 5:40 ` [PATCH v2 1/7] Documentation: KUnit: Rewrite main page Harinder Singh
2021-12-07 17:11 ` Tim.Bird
2021-12-10 5:30 ` Harinder Singh
2021-12-07 5:40 ` [PATCH v2 2/7] Documentation: KUnit: Rewrite getting started Harinder Singh
2021-12-07 5:40 ` [PATCH v2 3/7] Documentation: KUnit: Added KUnit Architecture Harinder Singh
2021-12-07 17:24 ` Tim.Bird
2021-12-10 5:31 ` Harinder Singh
2021-12-10 23:08 ` Marco Elver
2021-12-16 6:12 ` Harinder Singh
2021-12-07 5:40 ` [PATCH v2 4/7] Documentation: kunit: Reorganize documentation related to running tests Harinder Singh
2021-12-07 17:33 ` Tim.Bird
2021-12-10 5:31 ` Harinder Singh [this message]
2021-12-07 5:40 ` [PATCH v2 5/7] Documentation: KUnit: Rework writing page to focus on writing tests Harinder Singh
2021-12-07 18:28 ` Tim.Bird
2021-12-10 5:31 ` Harinder Singh
2021-12-10 17:16 ` Tim.Bird
2021-12-16 5:43 ` Harinder Singh
2021-12-07 5:40 ` [PATCH v2 6/7] Documentation: KUnit: Restyle Test Style and Nomenclature page Harinder Singh
2021-12-07 18:46 ` Tim.Bird
2021-12-10 5:30 ` Harinder Singh
2021-12-07 5:40 ` [PATCH v2 7/7] Documentation: KUnit: Restyled Frequently Asked Questions Harinder Singh
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=CAHLZCaE5XLcrLrN5xEETfE3eKS8K4p5oQgAWSoqLJWm9WK7XLg@mail.gmail.com \
--to=sharinder@google.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=tim.bird@sony.com \
/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).