On Sat, Nov 16, 2024 at 08:30:23PM +0530, Ayush Singh wrote: > Add tests to verify path reference support in overlays > > Signed-off-by: Ayush Singh <ayush@xxxxxxxxxxxxxxx> > --- > tests/overlay_overlay.dts | 11 +++++++++++ > tests/overlay_overlay_manual_fixups.dts | 26 +++++++++++++++++++++++++- > tests/overlay_overlay_nosugar.dts | 19 +++++++++++++++++++ > 3 files changed, 55 insertions(+), 1 deletion(-) > > diff --git a/tests/overlay_overlay.dts b/tests/overlay_overlay.dts > index c4ef1d47f1f159c5284c8f7282a0232d944ecfd1..18382762eb3d7c26b0f2e507acc3803f38194fb1 100644 > --- a/tests/overlay_overlay.dts > +++ b/tests/overlay_overlay.dts > @@ -50,3 +50,14 @@ > new-sub-test-property; > }; > }; > + > +&test { > + test-patha = &test; > + test-pathb = &test; > +}; > + > +&test { > + sub-path-test-node { > + test-path = &test; > + }; > +}; You should test path references combined with other pieces too: test-pathc = "a string", &test, "another string"; In fact it would even be a good idea to test path references combined with phandle references. test-pathd = "a string", <0x1 0x2 &test>, &test; > diff --git a/tests/overlay_overlay_manual_fixups.dts b/tests/overlay_overlay_manual_fixups.dts > index a5715b6048acaeebcdab56060040a339d08686a3..c40297aaefaaa6d168e42f864639a05bbbe69f57 100644 > --- a/tests/overlay_overlay_manual_fixups.dts > +++ b/tests/overlay_overlay_manual_fixups.dts > @@ -86,6 +86,25 @@ > }; > }; > > + fragment@8 { > + target = <0xffffffff /*&test*/>; > + > + __overlay__ { > + test-patha; > + test-pathb; > + }; > + }; > + > + fragment@9 { > + target = <0xffffffff /*&test*/>; > + > + __overlay__ { > + sub-path-test-node { > + test-path; > + }; > + }; > + }; > + > __fixups__ { > test = "/fragment@0:target:0", > "/fragment@1:target:0", > @@ -95,7 +114,12 @@ > "/fragment@5:target:0", > "/fragment@5/__overlay__:test-phandle:0", > "/fragment@6:target:0", > - "/fragment@7:target:0"; > + "/fragment@7:target:0", > + "/fragment@8:target:0", > + "/fragment@8/__overlay__:test-patha:0", > + "/fragment@8/__overlay__:test-pathb:0", > + "/fragment@9:target:0", > + "/fragment@9/__overlay__/sub-path-test-node:test-path:0"; > }; > __local_fixups__ { > fragment@5 { > diff --git a/tests/overlay_overlay_nosugar.dts b/tests/overlay_overlay_nosugar.dts > index b5947e96fb00dcf2c321c9f43e708863053b14b3..7e54ae5f5e7641bdf08626200e9471067b0f7677 100644 > --- a/tests/overlay_overlay_nosugar.dts > +++ b/tests/overlay_overlay_nosugar.dts > @@ -83,4 +83,23 @@ > }; > }; > }; > + > + fragment@8 { > + target = <&test>; > + > + __overlay__ { > + test-patha = &test; > + test-pathb = &test; > + }; > + }; > + > + fragment@9 { > + target = <&test>; > + > + __overlay__ { > + sub-path-test-node { > + test-path = &test; > + }; > + }; > + }; > }; > -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: PGP signature