Rust for Linux List
 help / color / mirror / Atom feed
From: Valentin Obst <kernel@valentinobst.de>
To: laura.nao@collabora.com
Cc: a.hindborg@samsung.com, alex.gaynor@gmail.com,
	aliceryhl@google.com, benno.lossin@proton.me,
	bjorn3_gh@protonmail.com, boqun.feng@gmail.com,
	dirk.behme@de.bosch.com, gary@garyguo.net,
	kernel-linux@vger.kernel.org, kernel@collabora.com,
	kernel@valentinobst.de, ojeda@kernel.org,
	rust-for-linux@vger.kernel.org, usama.anjum@collabora.com,
	wedsonaf@gmail.com
Subject: Re: [PATCH v2] docs: rust: Add instructions for the Rust kselftest
Date: Fri,  5 Apr 2024 10:46:34 +0200	[thread overview]
Message-ID: <20240405084634.3474-1-kernel@valentinobst.de> (raw)
In-Reply-To: <20240403092452.30300-1-laura.nao@collabora.com>

> Add section describing how to build and run the Rust kselftest.
>
> Signed-off-by: Laura Nao <laura.nao@collabora.com>
> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

Hi,

thanks for clarifying the system requirements. Only minor things (see
below), irrespective of that offering:

Reviewed-by: Valentin Obst <kernel@valentinobst.de>

> ---
> Changes in v2:
> - Use plural to account for potential other tests added later
> - Omit details about the test_probe_samples test
> - Clarify that kselftests are intended to be executed on a system running the same kernel to be tested
> ---
>  Documentation/rust/testing.rst | 25 ++++++++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/rust/testing.rst b/Documentation/rust/testing.rst
> index 6658998d1b6c..64f58c4308f8 100644
> --- a/Documentation/rust/testing.rst
> +++ b/Documentation/rust/testing.rst
> @@ -6,10 +6,11 @@ Testing
>  This document contains useful information how to test the Rust code in the
>  kernel.
>
> -There are two sorts of tests:
> +There are three sorts of tests:
>
>  - The KUnit tests.
>  - The ``#[test]`` tests.
> +- The Kselftests.
>
>  The KUnit tests
>  ---------------
> @@ -133,3 +134,25 @@ Additionally, there are the ``#[test]`` tests. These can be run using the
>  This requires the kernel ``.config`` and downloads external repositories. It
>  runs the ``#[test]`` tests on the host (currently) and thus is fairly limited in
>  what these tests can test.
> +
> +The Kselftests
> +--------------
> +
> +Kselftests are also available in the tools/testing/selftests/rust folder.
> +
> +The kernel config options required for the test are listed in the

Is this intentionally still in singular? Maybe replace /test/tests/?

> +tools/testing/selftests/rust/config file and can be included with the aid
> +of the merge_config.sh script::
> +
> +	./scripts/kconfig/merge_config.sh .config tools/testing/selftests/rust/config
> +
> +The kselftests are built within the kernel source tree and are intended to
> +be executed on a system that is running the same kernel.
> +
> +Once a kernel matching the source tree has been booted, the tests

Maybe say 'installed and booted' here since at least one test is using
modprobe, which expects to find the modules and other things in some
standard locations.

	- Best Valentin

> +can be compiled and executed using the following command::
> +
> +	make TARGETS="rust" kselftest
> +
> +Refer to Documentation/dev-tools/kselftest.rst for the general Kselftest
> +documentation.
> --
> 2.30.2
>
>

  reply	other threads:[~2024-04-05  8:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03  9:24 [PATCH v2] docs: rust: Add instructions for the Rust kselftest Laura Nao
2024-04-05  8:46 ` Valentin Obst [this message]
2024-04-05 10:45   ` Laura Nao

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=20240405084634.3474-1-kernel@valentinobst.de \
    --to=kernel@valentinobst.de \
    --cc=a.hindborg@samsung.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dirk.behme@de.bosch.com \
    --cc=gary@garyguo.net \
    --cc=kernel-linux@vger.kernel.org \
    --cc=kernel@collabora.com \
    --cc=laura.nao@collabora.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=usama.anjum@collabora.com \
    --cc=wedsonaf@gmail.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