[Crosstoolchain-logs] [device-tree-compiler] 14/29: tests: Add some basic tests for the pci_bridge checks

Vagrant Cascadian vagrant at moszumanska.debian.org
Tue Jan 23 06:34:38 UTC 2018


This is an automated email from the git hooks/post-receive script.

vagrant pushed a commit to branch debian/master
in repository device-tree-compiler.

commit fe667e382bac9326eaea304da2ade5ecb10997d3
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Sat Nov 11 17:52:50 2017 +1100

    tests: Add some basic tests for the pci_bridge checks
    
    This adds some simple tests for the checks of correctly formatted PCI
    bridge nodes.  Doesn't test all that much, but it's a start.
    
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 tests/pci-bridge-bad1.dts | 16 ++++++++++++++++
 tests/pci-bridge-bad2.dts | 16 ++++++++++++++++
 tests/pci-bridge-ok.dts   | 25 +++++++++++++++++++++++++
 tests/run_tests.sh        |  4 ++++
 4 files changed, 61 insertions(+)

diff --git a/tests/pci-bridge-bad1.dts b/tests/pci-bridge-bad1.dts
new file mode 100644
index 0000000..17aac04
--- /dev/null
+++ b/tests/pci-bridge-bad1.dts
@@ -0,0 +1,16 @@
+/dts-v1/;
+
+/ {
+	compatible = "example,pci-bridge-ok";
+	#address-cells = < 2 >;
+	#size-cells = < 2 >;
+	abadname at 0 {
+		device_type = "pci";
+		compatible = "example,pci-bridge";
+		#address-cells = < 3 >;
+		#size-cells = < 2 >;
+		reg = <0 0 0 0x1000>;
+		bus-range = <0 0xff>;
+		ranges = <0 0 0 0 0 0 0x10000>;
+	};
+};
diff --git a/tests/pci-bridge-bad2.dts b/tests/pci-bridge-bad2.dts
new file mode 100644
index 0000000..a7e5c05
--- /dev/null
+++ b/tests/pci-bridge-bad2.dts
@@ -0,0 +1,16 @@
+/dts-v1/;
+
+/ {
+	compatible = "example,pci-bridge-ok";
+	#address-cells = < 2 >;
+	#size-cells = < 2 >;
+	p at 0 {
+		device_type = "pci";
+		compatible = "example,pci-bridge";
+		#address-cells = < 3 >;
+		#size-cells = < 2 >;
+		reg = <0 0 0 0x1000>;
+		bus-range = <0 0xff>;
+		ranges = <0 0 0 0 0 0 0x10000>;
+	};
+};
diff --git a/tests/pci-bridge-ok.dts b/tests/pci-bridge-ok.dts
new file mode 100644
index 0000000..02e32e0
--- /dev/null
+++ b/tests/pci-bridge-ok.dts
@@ -0,0 +1,25 @@
+/dts-v1/;
+
+/ {
+	compatible = "example,pci-bridge-ok";
+	#address-cells = < 2 >;
+	#size-cells = < 2 >;
+	pci at 0 {
+		device_type = "pci";
+		compatible = "example,pci-bridge";
+		#address-cells = < 3 >;
+		#size-cells = < 2 >;
+		reg = <0 0 0 0x1000>;
+		bus-range = <0 0xff>;
+		ranges = <0 0 0 0 0 0 0x10000>;
+	};
+	pcie at 10000000000 {
+		device_type = "pci";
+		compatible = "example,pcie-bridge";
+		#address-cells = < 3 >;
+		#size-cells = < 2 >;
+		reg = <0x10 0x00000000 0 0x1000>;
+		bus-range = <0 0xff>;
+		ranges = <0 0 0 0 0 0 0x10000>;
+	};
+};
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 41a06be..850bc16 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -574,6 +574,10 @@ dtc_tests () {
     run_test check_path test_tree1.dtb exists "/subnode at 1"
     run_test check_path test_tree1.dtb not-exists "/subnode at 10"
 
+    check_tests pci-bridge-ok.dts -n pci_bridge
+    check_tests pci-bridge-bad1.dts pci_bridge
+    check_tests pci-bridge-bad2.dts pci_bridge
+
     # 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list