diff mbox series

[v2] Documentation: kunit: Cleanup run_wrapper, fix x-ref

Message ID 20220629040605.2395481-1-davidgow@google.com (mailing list archive)
State Accepted
Commit 7635778bac7e46458392c1261e3916e8e9e86860
Delegated to: Brendan Higgins
Headers show
Series [v2] Documentation: kunit: Cleanup run_wrapper, fix x-ref | expand

Commit Message

David Gow June 29, 2022, 4:06 a.m. UTC
The "Run Tests on qemu" section of run_wrapper.rst had a few issues left
over from the last big documentation refactor[1]:
- It referenced a non_uml.rst page, which was integrated into the other
  pages (including run_wrapper.rst).
- It skimmed over the use of --arch= and --cross_compile= in favour of
  using a custom --qemu_config. Since most users will want to use the
  former, let's give examples.

Remove the reference to the non-existant page, and add a couple of
examples to encourage the use of --arch= and --cross_compile=.

With this change, there should be no more broken references in the KUnit
documentation (i.e., the one mentioned in [2] is gone).

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=46201d47d6c4be594c1d57b7f3251c371626a9c4
[2]: https://lore.kernel.org/linux-doc/cover.1656234456.git.mchehab@kernel.org/

Signed-off-by: David Gow <davidgow@google.com>
---

Changes since v1:
https://lore.kernel.org/linux-kselftest/20220626101553.1885428-1-davidgow@google.com/
- Reword the --cross_compile example (Thanks Bagas Sanjaya)
- Fix the name of run_uml.rst -> non_uml.rst in the commit description.

---
 Documentation/dev-tools/kunit/run_wrapper.rst | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

Comments

Bagas Sanjaya June 29, 2022, 8:44 a.m. UTC | #1
On 6/29/22 11:06, David Gow wrote:
> +This means that for most architectures, running under qemu is as simple as:
> +
> +.. code-block:: bash
> +
> +	./tools/testing/kunit/kunit.py run --arch=x86_64
> +
> +When cross-compiling, we'll likely need to specify a different toolchain, for
> +example:
> +
> +.. code-block:: bash
> +
> +	./tools/testing/kunit/kunit.py run \
> +		--arch=s390 \
> +		--cross_compile=s390x-linux-gnu-
> +

nit: s/we'll/you'll/

Otherwise looks OK.
David Gow June 29, 2022, 9:05 a.m. UTC | #2
On Wed, Jun 29, 2022 at 4:44 PM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
>
> On 6/29/22 11:06, David Gow wrote:
> > +This means that for most architectures, running under qemu is as simple as:
> > +
> > +.. code-block:: bash
> > +
> > +     ./tools/testing/kunit/kunit.py run --arch=x86_64
> > +
> > +When cross-compiling, we'll likely need to specify a different toolchain, for
> > +example:
> > +
> > +.. code-block:: bash
> > +
> > +     ./tools/testing/kunit/kunit.py run \
> > +             --arch=s390 \
> > +             --cross_compile=s390x-linux-gnu-
> > +
>
> nit: s/we'll/you'll/
>
> Otherwise looks OK.

Thanks. The rest of this document is using "we" rather than "you", so
I used "we'll" for consistency. If "you" is preferred generally, it'd
be best to change it throughout the document (probably in a separate
patch).

Cheers,
-- David
Jonathan Corbet June 29, 2022, 12:55 p.m. UTC | #3
David Gow <davidgow@google.com> writes:

> Thanks. The rest of this document is using "we" rather than "you", so
> I used "we'll" for consistency. If "you" is preferred generally, it'd
> be best to change it throughout the document (probably in a separate
> patch).

Nobody has ever tried to articulate a wider policy on first or
second-person usage for kernel docs, so far as I know, and I think
that's just fine.  We have far bigger things to worry about before we
get concerned about consistency at that level.

Thanks,

jon
Brendan Higgins July 6, 2022, 6:40 p.m. UTC | #4
On Wed, Jun 29, 2022 at 12:06 AM David Gow <davidgow@google.com> wrote:
>
> The "Run Tests on qemu" section of run_wrapper.rst had a few issues left
> over from the last big documentation refactor[1]:
> - It referenced a non_uml.rst page, which was integrated into the other
>   pages (including run_wrapper.rst).
> - It skimmed over the use of --arch= and --cross_compile= in favour of
>   using a custom --qemu_config. Since most users will want to use the
>   former, let's give examples.
>
> Remove the reference to the non-existant page, and add a couple of
> examples to encourage the use of --arch= and --cross_compile=.
>
> With this change, there should be no more broken references in the KUnit
> documentation (i.e., the one mentioned in [2] is gone).
>
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=46201d47d6c4be594c1d57b7f3251c371626a9c4
> [2]: https://lore.kernel.org/linux-doc/cover.1656234456.git.mchehab@kernel.org/
>
> Signed-off-by: David Gow <davidgow@google.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
diff mbox series

Patch

diff --git a/Documentation/dev-tools/kunit/run_wrapper.rst b/Documentation/dev-tools/kunit/run_wrapper.rst
index 653985ce9cae..5e560f2c5fca 100644
--- a/Documentation/dev-tools/kunit/run_wrapper.rst
+++ b/Documentation/dev-tools/kunit/run_wrapper.rst
@@ -192,6 +192,21 @@  via UML. To run tests on qemu, by default it requires two flags:
     if we have downloaded the microblaze toolchain from the 0-day
     website to a directory in our home directory called toolchains.
 
+This means that for most architectures, running under qemu is as simple as:
+
+.. code-block:: bash
+
+	./tools/testing/kunit/kunit.py run --arch=x86_64
+
+When cross-compiling, we'll likely need to specify a different toolchain, for
+example:
+
+.. code-block:: bash
+
+	./tools/testing/kunit/kunit.py run \
+		--arch=s390 \
+		--cross_compile=s390x-linux-gnu-
+
 If we want to run KUnit tests on an architecture not supported by
 the ``--arch`` flag, or want to run KUnit tests on qemu using a
 non-default configuration; then we can write our own``QemuConfig``.
@@ -214,9 +229,6 @@  as
 		--jobs=12 \
 		--qemu_config=./tools/testing/kunit/qemu_configs/x86_64.py
 
-To run existing KUnit tests on non-UML architectures, see:
-Documentation/dev-tools/kunit/non_uml.rst.
-
 Command-Line Arguments
 ======================