- Test /append-property/ on a string and int array. - Also test on subnode property. Signed-off-by: Ayush Singh <ayush@xxxxxxxxxxxxxxx> --- tests/append_prop.dts | 21 +++++++++++++++++++++ tests/run_tests.sh | 7 +++++++ 2 files changed, 28 insertions(+) diff --git a/tests/append_prop.dts b/tests/append_prop.dts new file mode 100644 index 0000000000000000000000000000000000000000..248d4ed5ce5a753c9444d21359249669d88b7784 --- /dev/null +++ b/tests/append_prop.dts @@ -0,0 +1,21 @@ +/dts-v1/; + +/ { + str-prop = "0"; + num-prop = <2>; + + subnode{ + str-prop = "0"; + num-prop = <2>; + }; +}; + +/ { + /append-property/ str-prop = "1"; + /append-property/ num-prop = <1>; + + subnode{ + /append-property/ str-prop = "1"; + /append-property/ num-prop = <1>; + }; +}; diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 937b128864d03a2aaa8edc171d7ec7bd8fa28569..571980a155ac4510c77686c254ee809a0f4ff108 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -708,6 +708,13 @@ dtc_tests () { run_dtc_test -I dts -O dtb -o dtc_tree1_delete.test.dtb "$SRCDIR/test_tree1_delete.dts" tree1_tests dtc_tree1_delete.test.dtb + # Check prop append functionality + run_dtc_test -I dts -O dtb -o append_prop.test.dtb "$SRCDIR/append_prop.dts" + run_fdtget_test "0 1" append_prop.test.dtb "/" "str-prop" + run_fdtget_test "2 1" append_prop.test.dtb "/" "num-prop" + run_fdtget_test "0 1" append_prop.test.dtb "/subnode" "str-prop" + run_fdtget_test "2 1" append_prop.test.dtb "/subnode" "num-prop" + # Check omit-if-no-ref functionality run_dtc_test -I dts -O dtb -o omit-no-ref.test.dtb "$SRCDIR/omit-no-ref.dts" run_test check_path omit-no-ref.test.dtb not-exists "/node1" -- 2.47.0