lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHLZCaE5XLcrLrN5xEETfE3eKS8K4p5oQgAWSoqLJWm9WK7XLg@mail.gmail.com>
Date:   Fri, 10 Dec 2021 11:01:32 +0530
From:   Harinder Singh <sharinder@...gle.com>
To:     tim.bird@...y.com
Cc:     davidgow@...gle.com, brendanhiggins@...gle.com, shuah@...nel.org,
        corbet@....net, linux-kselftest@...r.kernel.org,
        kunit-dev@...glegroups.com, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [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@...y.com> wrote:
>
> > -----Original Message-----
> > From: Harinder Singh <sharinder@...gle.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@...gle.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ