lkml.org 
[lkml]   [2021]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 4/7] Documentation: kunit: Reorganize documentation related to running tests
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

\
 
 \ /
  Last update: 2021-12-10 06:32    [W:0.068 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site