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: <BYAPR13MB2503F47AA79D51CDE321AB21FD6E9@BYAPR13MB2503.namprd13.prod.outlook.com>
Date:   Tue, 7 Dec 2021 17:33:01 +0000
From:   <Tim.Bird@...y.com>
To:     <sharinder@...gle.com>, <davidgow@...gle.com>,
        <brendanhiggins@...gle.com>, <shuah@...nel.org>, <corbet@....net>
CC:     <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

> -----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')

> +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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ