aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-07-31 22:10:05 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2022-07-31 22:10:05 +1000
commite37c25677dc946a025002a394172788b3169b3ce (patch)
treeb71c6a0bafb8bf53b41095d9e923b5cdcdc5d1f8 /tests
parent50454658f2b5c8968ccd7856d94020c893a4be46 (diff)
downloaddtc-e37c25677dc946a025002a394172788b3169b3ce.zip
dtc-e37c25677dc946a025002a394172788b3169b3ce.tar.gz
dtc-e37c25677dc946a025002a394172788b3169b3ce.tar.bz2
Don't generate erroneous fixups from reference to path
The dtb overlay format only permits (non local) fixups to reference labels, not paths. That's because the fixup target goes into the property name in the overlay, and property names aren't permitted to include '/' characters. Stop erroneously generating such fixups, because we didn't check for this case. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/fixup-ref-to-path.dts6
-rwxr-xr-xtests/run_tests.sh1
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/fixup-ref-to-path.dts b/tests/fixup-ref-to-path.dts
new file mode 100644
index 0000000..f6dcba0
--- /dev/null
+++ b/tests/fixup-ref-to-path.dts
@@ -0,0 +1,6 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ prop = < &{/path/to/node} >;
+};
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 0cabd13..244df8a 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -271,6 +271,7 @@ libfdt_overlay_tests () {
run_dtc_test -I dts -O dtb -o $tree.test.dtb "$SRCDIR/$tree.dts"
run_test overlay_bad_fixup overlay_base_no_symbols.test.dtb $tree.test.dtb
done
+ run_sh_test "$SRCDIR/dtc-fatal.sh" -I dts -O dtb -o /dev/null fixup-ref-to-path.dts
}
# Tests to exercise dtc's overlay generation support