test: create dedicated fdt node for ofnode_for_each_prop test

Property count may change in /buttons node, if more button tests added,
and this will break ofnode_for_each_prop.
Add separate node for mentioned test.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Dzmitry Sankouski 2023-01-22 18:21:23 +03:00 committed by Tom Rini
parent 2ea062265f
commit 298ffdd5d6
2 changed files with 15 additions and 1 deletions

View file

@ -1537,6 +1537,20 @@
};
};
ofnode-foreach {
compatible = "foreach";
first {
prop1 = <1>;
prop2 = <2>;
};
second {
prop1 = <1>;
prop2 = <2>;
};
};
osd {
compatible = "sandbox,sandbox_osd";
};

View file

@ -1046,7 +1046,7 @@ static int dm_test_ofnode_for_each_prop(struct unit_test_state *uts)
struct ofprop prop;
int count;
node = ofnode_path("/buttons");
node = ofnode_path("/ofnode-foreach");
count = 0;
/* we expect "compatible" for each node */