aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run_tests.sh4
-rw-r--r--tests/unit-addr-simple-bus-compatible.dts18
-rw-r--r--tests/unit-addr-simple-bus-reg-mismatch.dts18
3 files changed, 40 insertions, 0 deletions
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index adc4dae..6756f3d 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -668,6 +668,10 @@ dtc_tests () {
check_tests pci-bridge-bad1.dts pci_bridge
check_tests pci-bridge-bad2.dts pci_bridge
+ check_tests unit-addr-simple-bus-reg-mismatch.dts simple_bus_reg
+ check_tests unit-addr-simple-bus-compatible.dts simple_bus_reg
+
+
# Check warning options
run_sh_test dtc-checkfails.sh address_cells_is_cell interrupt_cells_is_cell -n size_cells_is_cell -- -Wno_size_cells_is_cell -I dts -O dtb bad-ncells.dts
run_sh_test dtc-fails.sh -n test-warn-output.test.dtb -I dts -O dtb bad-ncells.dts
diff --git a/tests/unit-addr-simple-bus-compatible.dts b/tests/unit-addr-simple-bus-compatible.dts
new file mode 100644
index 0000000..c8f9341
--- /dev/null
+++ b/tests/unit-addr-simple-bus-compatible.dts
@@ -0,0 +1,18 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ bus@10000000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "foo-bus", "simple-bus";
+ ranges = <0x0 0x10000000 0x10000>;
+
+ node@100 {
+ reg = <0x1000 1>;
+ };
+ };
+
+};
diff --git a/tests/unit-addr-simple-bus-reg-mismatch.dts b/tests/unit-addr-simple-bus-reg-mismatch.dts
new file mode 100644
index 0000000..2823377
--- /dev/null
+++ b/tests/unit-addr-simple-bus-reg-mismatch.dts
@@ -0,0 +1,18 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ bus@10000000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "simple-bus";
+ ranges = <0x0 0x10000000 0x10000>;
+
+ node@100 {
+ reg = <0x1000 1>;
+ };
+ };
+
+};