From mboxrd@z Thu Jan 1 00:00:00 1970 From: kevans-HZy0K5TPuP5AfugRpC6u6w@public.gmane.org Subject: [PATCH v2 2/2] overlays: auto allocate phandles for nodes in base fdt Date: Mon, 1 Jan 2018 00:59:45 -0600 Message-ID: <20180101065945.65451-3-kevans@FreeBSD.org> References: <20180101065945.65451-1-kevans@FreeBSD.org> Return-path: In-Reply-To: <20180101065945.65451-1-kevans-HZy0K5TPuP5AfugRpC6u6w@public.gmane.org> Sender: devicetree-compiler-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Gibson , Jon Loeliger Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Kyle Evans Add some regression tests for automatically allocated phandles. The base dts is simply a copy of overlay_base_manual_symbols.dts with the forced phandle removed, thus copyright notices remain intact. Signed-off-by: Kyle Evans --- tests/overlay_base_manual_symbols_auto_phandle.dts | 24 ++++++++++++++++++++++ tests/run_tests.sh | 6 ++++++ 2 files changed, 30 insertions(+) create mode 100644 tests/overlay_base_manual_symbols_auto_phandle.dts diff --git a/tests/overlay_base_manual_symbols_auto_phandle.dts b/tests/overlay_base_manual_symbols_auto_phandle.dts new file mode 100644 index 0000000..6acdcf8 --- /dev/null +++ b/tests/overlay_base_manual_symbols_auto_phandle.dts @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2016 NextThing Co + * Copyright (c) 2016 Free Electrons + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; + +/ { + test: test-node { + test-int-property = <42>; + test-str-property = "foo"; + + subtest: sub-test-node { + sub-test-property; + }; + }; + __symbols__ { + test = &test; + }; +}; + + diff --git a/tests/run_tests.sh b/tests/run_tests.sh index d36dffb..6ed6d02 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -198,12 +198,18 @@ libfdt_overlay_tests () { run_test check_path overlay_base_manual_symbols.test.dtb not-exists "/__fixups__" run_test check_path overlay_base_manual_symbols.test.dtb not-exists "/__local_fixups__" + run_dtc_test -I dts -O dtb -o overlay_base_manual_symbols_auto_phandle.test.dtb overlay_base_manual_symbols_auto_phandle.dts + run_test check_path overlay_base_manual_symbols_auto_phandle.test.dtb exists "/__symbols__" + run_test check_path overlay_base_manual_symbols_auto_phandle.test.dtb not-exists "/__fixups__" + run_test check_path overlay_base_manual_symbols_auto_phandle.test.dtb not-exists "/__local_fixups__" + run_dtc_test -I dts -O dtb -o overlay_overlay_manual_fixups.test.dtb overlay_overlay_manual_fixups.dts run_test check_path overlay_overlay_manual_fixups.test.dtb not-exists "/__symbols__" run_test check_path overlay_overlay_manual_fixups.test.dtb exists "/__fixups__" run_test check_path overlay_overlay_manual_fixups.test.dtb exists "/__local_fixups__" run_test overlay overlay_base_manual_symbols.test.dtb overlay_overlay_manual_fixups.test.dtb + run_test overlay overlay_base_manual_symbols_auto_phandle.test.dtb overlay_overlay_manual_fixups.test.dtb # test simplified plugin syntax run_dtc_test -@ -I dts -O dtb -o overlay_overlay_simple.dtb overlay_overlay_simple.dts -- 2.15.1