2022-08-13 04:53:35

by Tales Aparecida

[permalink] [raw]
Subject: [PATCH 0/4] Documentation: KUnit: minor fixes

Hi,

This is a short series of minor fixes to the Kunit documentation,
they probably can be squashed but I suppose it's easier
to review them individually.

Thanks for any feedbacks,
Tales

Tales Aparecida (4):
Documentation: kunit: fix trivial typo
Documentation: Kunit: Fix inconsistent titles
Documentation: KUnit: Fix non-uml anchor
Documentation: Kunit: Add ref for other kinds of tests

Documentation/dev-tools/kunit/architecture.rst | 4 ++--
Documentation/dev-tools/kunit/faq.rst | 8 +++++---
Documentation/dev-tools/kunit/index.rst | 2 ++
Documentation/dev-tools/kunit/run_wrapper.rst | 4 +++-
Documentation/dev-tools/kunit/usage.rst | 4 ++--
5 files changed, 14 insertions(+), 8 deletions(-)

--
2.37.1


2022-08-13 05:06:16

by Tales Aparecida

[permalink] [raw]
Subject: [PATCH 3/4] Documentation: KUnit: Fix non-uml anchor

The section was rewritten but its anchor got left behind.
Fix the anchor and add some references to running on QEMU.

Signed-off-by: Tales Aparecida <[email protected]>
---
Documentation/dev-tools/kunit/faq.rst | 6 +++---
Documentation/dev-tools/kunit/run_wrapper.rst | 2 ++
Documentation/dev-tools/kunit/usage.rst | 4 ++--
3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Documentation/dev-tools/kunit/faq.rst b/Documentation/dev-tools/kunit/faq.rst
index 172e239791a8..f1b4cef68ced 100644
--- a/Documentation/dev-tools/kunit/faq.rst
+++ b/Documentation/dev-tools/kunit/faq.rst
@@ -31,7 +31,8 @@ For the most part, the KUnit core framework (what we use to write the tests)
can compile to any architecture. It compiles like just another part of the
kernel and runs when the kernel boots, or when built as a module, when the
module is loaded. However, there is infrastructure, like the KUnit Wrapper
-(``tools/testing/kunit/kunit.py``) that does not support other architectures.
+(``tools/testing/kunit/kunit.py``) that might not support some architectures
+(see :ref:`kunit-on-qemu`).

In short, yes, you can run KUnit on other architectures, but it might require
more work than using KUnit on UML.
@@ -95,8 +96,7 @@ things to try.
seeing. When tests are built-in, they will execute when the kernel boots, and
modules will automatically execute associated tests when loaded. Test results
can be collected from ``/sys/kernel/debug/kunit/<test suite>/results``, and
- can be parsed with ``kunit.py parse``. For more details, see "KUnit on
- non-UML architectures" in Documentation/dev-tools/kunit/usage.rst.
+ can be parsed with ``kunit.py parse``. For more details, see :ref:`kunit-on-qemu`.

If none of the above tricks help, you are always welcome to email any issues to
[email protected].
diff --git a/Documentation/dev-tools/kunit/run_wrapper.rst b/Documentation/dev-tools/kunit/run_wrapper.rst
index db1e867820e7..a1070def284f 100644
--- a/Documentation/dev-tools/kunit/run_wrapper.rst
+++ b/Documentation/dev-tools/kunit/run_wrapper.rst
@@ -165,6 +165,8 @@ example: if we only want to run KUnit resource tests, use:

This uses the standard glob format with wildcard characters.

+.. _kunit-on-qemu:
+
Run Tests on qemu
=================

diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
index 44158eecb51e..2737863ef365 100644
--- a/Documentation/dev-tools/kunit/usage.rst
+++ b/Documentation/dev-tools/kunit/usage.rst
@@ -165,6 +165,8 @@ built as a module).

For more information, see Documentation/dev-tools/kunit/api/test.rst.

+.. _kunit-on-non-uml:
+
Writing Tests For Other Architectures
-------------------------------------

@@ -544,8 +546,6 @@ By reusing the same ``cases`` array from above, we can write the test as a
{}
};

-.. _kunit-on-non-uml:
-
Exiting Early on Failed Expectations
------------------------------------

--
2.37.1

2022-08-13 07:05:44

by David Gow

[permalink] [raw]
Subject: Re: [PATCH 3/4] Documentation: KUnit: Fix non-uml anchor

On Sat, Aug 13, 2022 at 12:21 PM Tales Aparecida
<[email protected]> wrote:
>
> The section was rewritten but its anchor got left behind.
> Fix the anchor and add some references to running on QEMU.
>
> Signed-off-by: Tales Aparecida <[email protected]>
> ---

Thanks very much for fixing these. This is something we tried to clean
up last year when Qemu support happened, and we definitely missed
these bits.

Reviewed-by: David Gow <[email protected]>

Cheers,
-- David


> Documentation/dev-tools/kunit/faq.rst | 6 +++---
> Documentation/dev-tools/kunit/run_wrapper.rst | 2 ++
> Documentation/dev-tools/kunit/usage.rst | 4 ++--
> 3 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/dev-tools/kunit/faq.rst b/Documentation/dev-tools/kunit/faq.rst
> index 172e239791a8..f1b4cef68ced 100644
> --- a/Documentation/dev-tools/kunit/faq.rst
> +++ b/Documentation/dev-tools/kunit/faq.rst
> @@ -31,7 +31,8 @@ For the most part, the KUnit core framework (what we use to write the tests)
> can compile to any architecture. It compiles like just another part of the
> kernel and runs when the kernel boots, or when built as a module, when the
> module is loaded. However, there is infrastructure, like the KUnit Wrapper
> -(``tools/testing/kunit/kunit.py``) that does not support other architectures.
> +(``tools/testing/kunit/kunit.py``) that might not support some architectures
> +(see :ref:`kunit-on-qemu`).
>
> In short, yes, you can run KUnit on other architectures, but it might require
> more work than using KUnit on UML.
> @@ -95,8 +96,7 @@ things to try.
> seeing. When tests are built-in, they will execute when the kernel boots, and
> modules will automatically execute associated tests when loaded. Test results
> can be collected from ``/sys/kernel/debug/kunit/<test suite>/results``, and
> - can be parsed with ``kunit.py parse``. For more details, see "KUnit on
> - non-UML architectures" in Documentation/dev-tools/kunit/usage.rst.
> + can be parsed with ``kunit.py parse``. For more details, see :ref:`kunit-on-qemu`.
>
> If none of the above tricks help, you are always welcome to email any issues to
> [email protected].
> diff --git a/Documentation/dev-tools/kunit/run_wrapper.rst b/Documentation/dev-tools/kunit/run_wrapper.rst
> index db1e867820e7..a1070def284f 100644
> --- a/Documentation/dev-tools/kunit/run_wrapper.rst
> +++ b/Documentation/dev-tools/kunit/run_wrapper.rst
> @@ -165,6 +165,8 @@ example: if we only want to run KUnit resource tests, use:
>
> This uses the standard glob format with wildcard characters.
>
> +.. _kunit-on-qemu:
> +
> Run Tests on qemu
> =================
>
> diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
> index 44158eecb51e..2737863ef365 100644
> --- a/Documentation/dev-tools/kunit/usage.rst
> +++ b/Documentation/dev-tools/kunit/usage.rst
> @@ -165,6 +165,8 @@ built as a module).
>
> For more information, see Documentation/dev-tools/kunit/api/test.rst.
>
> +.. _kunit-on-non-uml:
> +
> Writing Tests For Other Architectures
> -------------------------------------
>
> @@ -544,8 +546,6 @@ By reusing the same ``cases`` array from above, we can write the test as a
> {}
> };
>
> -.. _kunit-on-non-uml:
> -
> Exiting Early on Failed Expectations
> ------------------------------------
>
> --
> 2.37.1
>
> --
> You received this message because you are subscribed to the Google Groups "KUnit Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/msgid/kunit-dev/20220813042055.136832-4-tales.aparecida%40gmail.com.


Attachments:
smime.p7s (3.91 kB)
S/MIME Cryptographic Signature

2022-08-15 17:46:53

by André Almeida

[permalink] [raw]
Subject: Re: [PATCH 0/4] Documentation: KUnit: minor fixes

Hi Tales,

On 8/13/22 01:20, Tales Aparecida wrote:
> Hi,
>
> This is a short series of minor fixes to the Kunit documentation,
> they probably can be squashed but I suppose it's easier
> to review them individually.
>
> Thanks for any feedbacks,
> Tales
>

Series is Reviewed-by: André Almeida <[email protected]>

2022-08-18 18:27:26

by Tales Aparecida

[permalink] [raw]
Subject: Re: [PATCH 0/4] Documentation: KUnit: minor fixes

On 13/08/2022 01:20, Tales Aparecida wrote:
> Hi,
>
> This is a short series of minor fixes to the Kunit documentation,
> they probably can be squashed but I suppose it's easier
> to review them individually.
>
> Thanks for any feedbacks,
> Tales
>
> Tales Aparecida (4):
> Documentation: kunit: fix trivial typo
> Documentation: Kunit: Fix inconsistent titles
> Documentation: KUnit: Fix non-uml anchor
> Documentation: Kunit: Add ref for other kinds of tests
>
> Documentation/dev-tools/kunit/architecture.rst | 4 ++--
> Documentation/dev-tools/kunit/faq.rst | 8 +++++---
> Documentation/dev-tools/kunit/index.rst | 2 ++
> Documentation/dev-tools/kunit/run_wrapper.rst | 4 +++-
> Documentation/dev-tools/kunit/usage.rst | 4 ++--
> 5 files changed, 14 insertions(+), 8 deletions(-)
>

Hello,

Thanks for the reviews, everyone!
Should I send a V2 with squashed commits or will a committer handle that?

Kind regards,
Tales