2023-03-02 01:38:34

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 1/8] dt-bindings: Add linux,kunit binding

Document the linux,kunit board compatible string. This board is loaded
into the Linux kernel when KUnit is testing devicetree dependent code.

Cc: Rob Herring <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Brendan Higgins <[email protected]>
Cc: David Gow <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
.../bindings/kunit/linux,kunit.yaml | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 Documentation/devicetree/bindings/kunit/linux,kunit.yaml

diff --git a/Documentation/devicetree/bindings/kunit/linux,kunit.yaml b/Documentation/devicetree/bindings/kunit/linux,kunit.yaml
new file mode 100644
index 000000000000..dfe6da4796e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/kunit/linux,kunit.yaml
@@ -0,0 +1,24 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/kunit/linux,kunit.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: KUnit
+
+maintainers:
+ - Brendan Higgins <[email protected]>
+ - David Gow <[email protected]>
+
+description:
+ KUnit board used to unit test the Linux kernel in User Mode Linux (UML).
+
+properties:
+ $nodename:
+ const: "/"
+ compatible:
+ const: linux,kunit
+
+additionalProperties: true
+
+...
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git



2023-03-03 07:15:13

by David Gow

[permalink] [raw]
Subject: Re: [PATCH 1/8] dt-bindings: Add linux,kunit binding

On Thu, 2 Mar 2023 at 09:38, Stephen Boyd <[email protected]> wrote:
>
> Document the linux,kunit board compatible string. This board is loaded
> into the Linux kernel when KUnit is testing devicetree dependent code.

As with the series as a whole, this might need to change a little bit
if we want to either use devicetree overlays and/or other
architectures.

That being said, I'm okay with having this until then: the only real
topic for bikeshedding is the name.
- Is KUnit best as a board name, or part of the vendor name?
- Do we want to include the architecture in the name?
Should it be "linux,kunit", "linux-kunit,uml", "linux,kunit-uml", etc?


>
> Cc: Rob Herring <[email protected]>
> Cc: Krzysztof Kozlowski <[email protected]>
> Cc: Brendan Higgins <[email protected]>
> Cc: David Gow <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> .../bindings/kunit/linux,kunit.yaml | 24 +++++++++++++++++++
> 1 file changed, 24 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/kunit/linux,kunit.yaml
>
> diff --git a/Documentation/devicetree/bindings/kunit/linux,kunit.yaml b/Documentation/devicetree/bindings/kunit/linux,kunit.yaml
> new file mode 100644
> index 000000000000..dfe6da4796e8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/kunit/linux,kunit.yaml
> @@ -0,0 +1,24 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/kunit/linux,kunit.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: KUnit
> +
> +maintainers:
> + - Brendan Higgins <[email protected]>
> + - David Gow <[email protected]>
> +
> +description:
> + KUnit board used to unit test the Linux kernel in User Mode Linux (UML).
> +
> +properties:
> + $nodename:
> + const: "/"
> + compatible:
> + const: linux,kunit
> +
> +additionalProperties: true
> +
> +...
> --
> https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
> https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
>


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

2023-03-03 07:49:23

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/8] dt-bindings: Add linux,kunit binding

Hi David,

On Fri, Mar 3, 2023 at 8:16 AM David Gow <[email protected]> wrote:
> On Thu, 2 Mar 2023 at 09:38, Stephen Boyd <[email protected]> wrote:
> > Document the linux,kunit board compatible string. This board is loaded
> > into the Linux kernel when KUnit is testing devicetree dependent code.
>
> As with the series as a whole, this might need to change a little bit
> if we want to either use devicetree overlays and/or other
> architectures.
>
> That being said, I'm okay with having this until then: the only real
> topic for bikeshedding is the name.
> - Is KUnit best as a board name, or part of the vendor name?
> - Do we want to include the architecture in the name?
> Should it be "linux,kunit", "linux-kunit,uml", "linux,kunit-uml", etc?

I would not include an architecture (or virtualization method), as
this is independent of the architecture or virtualization method.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2023-03-10 07:55:32

by David Gow

[permalink] [raw]
Subject: Re: [PATCH 1/8] dt-bindings: Add linux,kunit binding

On Fri, 10 Mar 2023 at 07:12, Stephen Boyd <[email protected]> wrote:
>
> Quoting David Gow (2023-03-02 23:14:55)
> > On Thu, 2 Mar 2023 at 09:38, Stephen Boyd <[email protected]> wrote:
> > >
> > > Document the linux,kunit board compatible string. This board is loaded
> > > into the Linux kernel when KUnit is testing devicetree dependent code.
> >
> > As with the series as a whole, this might need to change a little bit
> > if we want to either use devicetree overlays and/or other
> > architectures.
> >
> > That being said, I'm okay with having this until then: the only real
> > topic for bikeshedding is the name.
> > - Is KUnit best as a board name, or part of the vendor name?
> > - Do we want to include the architecture in the name?
> > Should it be "linux,kunit", "linux-kunit,uml", "linux,kunit-uml", etc?
>
> I think I will drop this patch. I have overlays working. I hijacked
> of_core_init() to load the testcase data from drivers/of/unittest-data
> and made a container node for kunit overlays to apply to.

Makes sense to me, thanks!

Looking forward to seeing how the overlays work in practice!