summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/bad-graph-root1.dts7
-rw-r--r--tests/bad-graph-root2.dts2
-rw-r--r--tests/bad-graph-root3.dts14
-rw-r--r--tests/bad-graph-root4.dts19
-rwxr-xr-xtests/run_tests.sh4
5 files changed, 46 insertions, 0 deletions
diff --git a/tests/bad-graph-root1.dts b/tests/bad-graph-root1.dts
new file mode 100644
index 0000000..06cf915
--- /dev/null
+++ b/tests/bad-graph-root1.dts
@@ -0,0 +1,7 @@
+/dts-v1/;
+
+/ {
+ foo {
+ remote-endpoint = <0xdeadbeef>;
+ };
+};
diff --git a/tests/bad-graph-root2.dts b/tests/bad-graph-root2.dts
new file mode 100644
index 0000000..026f207
--- /dev/null
+++ b/tests/bad-graph-root2.dts
@@ -0,0 +1,2 @@
+/dts-v1/;
+/ { endpoint {}; };
diff --git a/tests/bad-graph-root3.dts b/tests/bad-graph-root3.dts
new file mode 100644
index 0000000..7360013
--- /dev/null
+++ b/tests/bad-graph-root3.dts
@@ -0,0 +1,14 @@
+/dts-v1/;
+
+ / {
+ bar: bar {
+ port {
+ bar_con: endpoint {
+ remote-endpoint = <&foo_con>;
+ };
+ };
+ };
+ foo_con: endpoint {
+ remote-endpoint = <&bar_con>;
+ };
+};
diff --git a/tests/bad-graph-root4.dts b/tests/bad-graph-root4.dts
new file mode 100644
index 0000000..5b1a1ea
--- /dev/null
+++ b/tests/bad-graph-root4.dts
@@ -0,0 +1,19 @@
+/dts-v1/;
+
+ / {
+
+ bar: bar {
+ port {
+ bar_con: endpoint {
+ remote-endpoint = <&foo_con>;
+ };
+ };
+ };
+ foo {
+ remote-endpoint = <&bar_con>; // misplaced remote-endpoint property
+ port {
+ foo_con: endpoint {
+ };
+ };
+ };
+};
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index f899d8c..2af8c15 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -730,6 +730,10 @@ dtc_tests () {
check_tests "$SRCDIR/bad-graph.dts" graph_child_address
check_tests "$SRCDIR/bad-graph.dts" graph_port
check_tests "$SRCDIR/bad-graph.dts" graph_endpoint
+ check_tests "$SRCDIR/bad-graph-root1.dts" graph_nodes
+ check_tests "$SRCDIR/bad-graph-root2.dts" graph_nodes
+ check_tests "$SRCDIR/bad-graph-root3.dts" graph_nodes
+ check_tests "$SRCDIR/bad-graph-root4.dts" graph_nodes
run_sh_test "$SRCDIR/dtc-checkfails.sh" deprecated_gpio_property -- -Wdeprecated_gpio_property -I dts -O dtb "$SRCDIR/bad-gpio.dts"
run_sh_test "$SRCDIR/dtc-checkfails.sh" -n deprecated_gpio_property -- -Wdeprecated_gpio_property -I dts -O dtb "$SRCDIR/good-gpio.dts"
check_tests "$SRCDIR/bad-interrupt-cells.dts" interrupts_property