Add test for re-defining an identical label
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@nvidia.com> Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
942b3c065f
commit
f67dfe8459
2 changed files with 17 additions and 0 deletions
15
tests/label_repeated.dts
Normal file
15
tests/label_repeated.dts
Normal file
|
@ -0,0 +1,15 @@
|
|||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
l0: prop = "foo";
|
||||
|
||||
l1: node {
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
l0: prop = "foo";
|
||||
|
||||
l1: node {
|
||||
};
|
||||
};
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue