devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH REPOST] Add test for re-defining an identical label
@ 2012-07-03 20:09 Stephen Warren
       [not found] ` <1341346170-16312-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2012-07-03 20:09 UTC (permalink / raw)
  To: Jon Loeliger, David Gibson; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

When merging one device tree over the top of a previous tree, it is
possible to define a duplicate label that has the same name and points
to the same property or node. This is currently allowed by the duplicate
label checking code. However, alternative duplicate label checking
algorithms might not allow this. Add an explicit test to ensure this
capability is maintained.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 tests/label_repeated.dts |   15 +++++++++++++++
 tests/run_tests.sh       |    2 ++
 2 files changed, 17 insertions(+), 0 deletions(-)
 create mode 100644 tests/label_repeated.dts

diff --git a/tests/label_repeated.dts b/tests/label_repeated.dts
new file mode 100644
index 0000000..34225d3
--- /dev/null
+++ b/tests/label_repeated.dts
@@ -0,0 +1,15 @@
+/dts-v1/;
+
+/ {
+	l0: prop = "foo";
+
+	l1: node {
+	};
+};
+
+/ {
+	l0: prop = "foo";
+
+	l1: node {
+	};
+};
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 9a2a7d9..e0299e3 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -281,6 +281,8 @@ dtc_tests () {
     run_dtc_test -I dts -O dtb -o multilabel.test.dtb multilabel.dts
     run_test references multilabel.test.dtb
 
+    run_dtc_test -I dts -O dtb -o label_repeated.test.dtb label_repeated.dts
+
     run_dtc_test -I dts -O dtb -o dtc_comments.test.dtb comments.dts
     run_dtc_test -I dts -O dtb -o dtc_comments-cmp.test.dtb comments-cmp.dts
     run_test dtbs_equal_ordered dtc_comments.test.dtb dtc_comments-cmp.test.dtb
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH REPOST] Add test for re-defining an identical label
       [not found] ` <1341346170-16312-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2012-07-08 12:51   ` David Gibson
       [not found]     ` <20120708125117.GA7749-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: David Gibson @ 2012-07-08 12:51 UTC (permalink / raw)
  To: Stephen Warren; +Cc: Stephen Warren, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Tue, Jul 03, 2012 at 02:09:30PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> When merging one device tree over the top of a previous tree, it is
> possible to define a duplicate label that has the same name and points
> to the same property or node. This is currently allowed by the duplicate
> label checking code. However, alternative duplicate label checking
> algorithms might not allow this. Add an explicit test to ensure this
> capability is maintained.

Sorry, I've been on leave and haven't really had brainspace to think
about this.  I think you're right though, whatever else we do with
stuff we do want to allow redefinition of labels as long as they
attach to the same thing (i.e. same path, and property within that
path when applicable).  Labels within property values do get curly if
that property is altered, but that doesn't directly affect this test.

> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Acked-by: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>

-- 
David Gibson			| 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH REPOST] Add test for re-defining an identical label
       [not found]     ` <20120708125117.GA7749-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
@ 2012-07-08 18:44       ` Jon Loeliger
       [not found]         ` <E1SnwSi-0008Eq-OH-CYoMK+44s/E@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jon Loeliger @ 2012-07-08 18:44 UTC (permalink / raw)
  To: David Gibson; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Stephen Warren

> On Tue, Jul 03, 2012 at 02:09:30PM -0600, Stephen Warren wrote:
> > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > 
> > When merging one device tree over the top of a previous tree, it is
> > possible to define a duplicate label that has the same name and points
> > to the same property or node. This is currently allowed by the duplicate
> > label checking code. However, alternative duplicate label checking
> > algorithms might not allow this. Add an explicit test to ensure this
> > capability is maintained.
> 
> Sorry, I've been on leave and haven't really had brainspace to think
> about this.  I think you're right though, whatever else we do with
> stuff we do want to allow redefinition of labels as long as they
> attach to the same thing (i.e. same path, and property within that
> path when applicable).  Labels within property values do get curly if
> that property is altered, but that doesn't directly affect this test.
> 
> > Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> Acked-by: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>

Applied.

Thanks,
jdl

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH REPOST] Add test for re-defining an identical label
       [not found]         ` <E1SnwSi-0008Eq-OH-CYoMK+44s/E@public.gmane.org>
@ 2012-07-08 23:42           ` David Gibson
       [not found]             ` <20120708234219.GD7749-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: David Gibson @ 2012-07-08 23:42 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Stephen Warren

On Sun, Jul 08, 2012 at 01:44:04PM -0500, Jon Loeliger wrote:
> > On Tue, Jul 03, 2012 at 02:09:30PM -0600, Stephen Warren wrote:
> > > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > > 
> > > When merging one device tree over the top of a previous tree, it is
> > > possible to define a duplicate label that has the same name and points
> > > to the same property or node. This is currently allowed by the duplicate
> > > label checking code. However, alternative duplicate label checking
> > > algorithms might not allow this. Add an explicit test to ensure this
> > > capability is maintained.
> > 
> > Sorry, I've been on leave and haven't really had brainspace to think
> > about this.  I think you're right though, whatever else we do with
> > stuff we do want to allow redefinition of labels as long as they
> > attach to the same thing (i.e. same path, and property within that
> > path when applicable).  Labels within property values do get curly if
> > that property is altered, but that doesn't directly affect this test.
> > 
> > > Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > 
> > Acked-by: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
> 
> Applied.

Hrm, apparently not pushed out, though.

-- 
David Gibson			| 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH REPOST] Add test for re-defining an identical label
       [not found]             ` <20120708234219.GD7749-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
@ 2012-07-09  0:05               ` Jon Loeliger
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Loeliger @ 2012-07-09  0:05 UTC (permalink / raw)
  To: David Gibson; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Stephen Warren

> > 
> > Applied.
> 
> Hrm, apparently not pushed out, though.

Rats. I am dumb.  Should be there now.

Sorry,
jdl

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-09  0:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-03 20:09 [PATCH REPOST] Add test for re-defining an identical label Stephen Warren
     [not found] ` <1341346170-16312-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-07-08 12:51   ` David Gibson
     [not found]     ` <20120708125117.GA7749-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-07-08 18:44       ` Jon Loeliger
     [not found]         ` <E1SnwSi-0008Eq-OH-CYoMK+44s/E@public.gmane.org>
2012-07-08 23:42           ` David Gibson
     [not found]             ` <20120708234219.GD7749-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-07-09  0:05               ` Jon Loeliger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).