From: Shuah Khan <skhan@linuxfoundation.org>
To: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
"Shuah Khan" <shuah@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>
Cc: kernel@collabora.com, linux-kselftest@vger.kernel.org,
workflows@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, kernelci@lists.linux.dev,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] docs: dev-tools: Add documentation for the device focused kselftests
Date: Wed, 2 Oct 2024 12:00:10 -0600 [thread overview]
Message-ID: <0040a842-de9c-4f9c-9d61-c1bfbd010470@linuxfoundation.org> (raw)
In-Reply-To: <20241001-kselftest-device-docs-v1-1-be28b70dd855@collabora.com>
On 10/1/24 09:43, Nícolas F. R. A. Prado wrote:
> Add documentation for the kselftests focused on testing devices and
> point to it from the kselftest documentation. There are multiple tests
> in this category so the aim of this page is to make it clear when to run
> each test.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> ---
> This patch depends on patch "kselftest: devices: Add test to detect
> missing devices" [1], since this patch documents that test.
>
> [1] https://lore.kernel.org/all/20240928-kselftest-dev-exist-v2-1-fab07de6b80b@collabora.com
> ---
> Documentation/dev-tools/kselftest.rst | 9 ++++++
> Documentation/dev-tools/testing-devices.rst | 47 +++++++++++++++++++++++++++++
The new file needs to be added to Documentation/dev-tools/index.rst
Docs make should have warned about this?
> 2 files changed, 56 insertions(+)
>
> diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
> index f3766e326d1e..fdb1df86783a 100644
> --- a/Documentation/dev-tools/kselftest.rst
> +++ b/Documentation/dev-tools/kselftest.rst
> @@ -31,6 +31,15 @@ kselftest runs as a userspace process. Tests that can be written/run in
> userspace may wish to use the `Test Harness`_. Tests that need to be
> run in kernel space may wish to use a `Test Module`_.
>
> +Documentation on the tests
> +==========================
> +
> +For documentation on the kselftests themselves, see:
> +
> +.. toctree::
> +
> + testing-devices
> +
> Running the selftests (hotplug tests are run in limited mode)
> =============================================================
>
> diff --git a/Documentation/dev-tools/testing-devices.rst b/Documentation/dev-tools/testing-devices.rst
> new file mode 100644
> index 000000000000..ab26adb99051
> --- /dev/null
> +++ b/Documentation/dev-tools/testing-devices.rst
> @@ -0,0 +1,47 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +.. Copyright (c) 2024 Collabora Ltd
> +
> +=============================
> +Device testing with kselftest
> +=============================
> +
Get rid of the extra blank line.
> +
> +There are a few different kselftests available for testing devices generically,
> +with some overlap in coverage and different requirements. This document aims to
> +give an overview of each one.
> +
> +Note: Paths in this document are relative to the kselftest folder
> +(``tools/testing/selftests``).
> +
> +Device oriented kselftests:
> +
> +* Devicetree (``dt``)
> +
> + * **Coverage**: Probe status for devices described in Devicetree
> + * **Requirements**: None
> +
> +* Error logs (``devices/error_logs``)
> +
> + * **Coverage**: Error (or more critical) log messages presence coming from any
> + device
> + * **Requirements**: None
> +
> +* Discoverable bus (``devices/probe``)
> +
> + * **Coverage**: Presence and probe status of USB or PCI devices that have been
> + described in the reference file
> + * **Requirements**: Manually describe the devices that should be tested in a
> + YAML reference file (see ``devices/probe/boards/google,spherion.yaml`` for
> + an example)
> +
> +* Exist (``devices/exist``)
> +
> + * **Coverage**: Presence of all devices
> + * **Requirements**: Generate the reference (see ``devices/exist/README.rst``
> + for details) on a known-good kernel
> +
> +Therefore, the suggestion is to enable the error log and devicetree tests on all
> +(DT-based) platforms, since they don't have any requirements. Then to greatly
> +improve coverage, generate the reference for each platform and enable the exist
> +test. The discoverable bus test can be used to verify the probe status of
> +specific USB or PCI devices, but is probably not worth it for most cases.
>
> ---
> base-commit: cea5425829f77e476b03702426f6b3701299b925
> change-id: 20241001-kselftest-device-docs-6c8a411109b5
>
> Best regards,
thanks,
-- Shuah
next prev parent reply other threads:[~2024-10-02 18:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 15:43 [PATCH] docs: dev-tools: Add documentation for the device focused kselftests Nícolas F. R. A. Prado
2024-10-02 18:00 ` Shuah Khan [this message]
2024-10-03 14:41 ` Nícolas F. R. A. Prado
2024-10-04 17:22 ` Shuah Khan
2024-10-04 17:36 ` Jonathan Corbet
2024-10-04 19:21 ` Shuah Khan
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=0040a842-de9c-4f9c-9d61-c1bfbd010470@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=corbet@lwn.net \
--cc=kernel@collabora.com \
--cc=kernelci@lists.linux.dev \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nfraprado@collabora.com \
--cc=shuah@kernel.org \
--cc=workflows@vger.kernel.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).