diff options
author | Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> | 2021-05-03 20:59:44 -0700 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-05-04 14:45:20 +1000 |
commit | c8bddd1060957ed0a5c95ea364cc13891742b09f (patch) | |
tree | 0785cb4f929124d4521f627ac501c073eb3cc52d /tests | |
parent | ad4abfadb687060d047a9cff664b471c7effb3b1 (diff) | |
download | dtc-c8bddd1060957ed0a5c95ea364cc13891742b09f.zip dtc-c8bddd1060957ed0a5c95ea364cc13891742b09f.tar.gz dtc-c8bddd1060957ed0a5c95ea364cc13891742b09f.tar.bz2 |
tests: add a positive gpio test case
Ensure that properly named properties don't trigger warnings
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Message-Id: <20210504035944.8453-5-ilya.lipnitskiy@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/good-gpio.dts | 12 | ||||
-rwxr-xr-x | tests/run_tests.sh | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/good-gpio.dts b/tests/good-gpio.dts new file mode 100644 index 0000000..65d1c17 --- /dev/null +++ b/tests/good-gpio.dts @@ -0,0 +1,12 @@ +/dts-v1/; + +/ { + gpio: gpio-controller { + #gpio-cells = <3>; + }; + + node { + foo,nr-gpios = <1>; + foo-gpios = <&gpio 1 2 3>; + }; +}; diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 5c2b1e8..0e8ecdb 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -709,10 +709,12 @@ dtc_tests () { check_tests "$SRCDIR/unit-addr-unique.dts" unique_unit_address check_tests "$SRCDIR/bad-phandle-cells.dts" interrupts_extended_property check_tests "$SRCDIR/bad-gpio.dts" gpios_property + check_tests "$SRCDIR/good-gpio.dts" -n gpios_property 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 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 check_tests "$SRCDIR/bad-interrupt-controller.dts" interrupt_provider run_sh_test "$SRCDIR/dtc-checkfails.sh" node_name_chars -- -I dtb -O dtb bad_node_char.dtb |