From 2d174375fd82cbc86e290695e4a00d1f29362977 Mon Sep 17 00:00:00 2001 From: Christophe Dufaza Date: Thu, 17 Oct 2024 21:56:24 +0200 Subject: [PATCH] Revert "edtlib: test "last modified" semantic for ... specs" This unit test was added to cover the change introduced by [1]. Further work on related issues [2] showed that the chosen approach is dead end. We're reverting all changes made in [1]. [1] edtlib: fix last modified semantic in included property specs [2] edtlib: Preserve paths of properties from included child bindings See also: #65221, #78095 This reverts commit 70eaa61cb0a4d6796575e6c68614e7c5fe361047. Signed-off-by: Christophe Dufaza --- .../tests/test-bindings-include/base.yaml | 7 ------- .../tests/test-bindings-include/modified.yaml | 7 ------- .../tests/test-bindings-include/top.yaml | 21 ------------------- .../python-devicetree/tests/test_edtlib.py | 12 ----------- 4 files changed, 47 deletions(-) delete mode 100644 scripts/dts/python-devicetree/tests/test-bindings-include/base.yaml delete mode 100644 scripts/dts/python-devicetree/tests/test-bindings-include/modified.yaml delete mode 100644 scripts/dts/python-devicetree/tests/test-bindings-include/top.yaml diff --git a/scripts/dts/python-devicetree/tests/test-bindings-include/base.yaml b/scripts/dts/python-devicetree/tests/test-bindings-include/base.yaml deleted file mode 100644 index f564578b48d0b4..00000000000000 --- a/scripts/dts/python-devicetree/tests/test-bindings-include/base.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause - -properties: - x: - type: int - y: - type: int diff --git a/scripts/dts/python-devicetree/tests/test-bindings-include/modified.yaml b/scripts/dts/python-devicetree/tests/test-bindings-include/modified.yaml deleted file mode 100644 index 3d8130c1aedd0b..00000000000000 --- a/scripts/dts/python-devicetree/tests/test-bindings-include/modified.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause - -include: base.yaml - -properties: - x: - required: true diff --git a/scripts/dts/python-devicetree/tests/test-bindings-include/top.yaml b/scripts/dts/python-devicetree/tests/test-bindings-include/top.yaml deleted file mode 100644 index 8fb9320676d515..00000000000000 --- a/scripts/dts/python-devicetree/tests/test-bindings-include/top.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause - -description: | - Top-level binding file for testing included property spec paths. - - base.yaml: specifies properties "x" and "y" - modified.yaml: includes base.yaml, modifies property "x" - top.yaml (this file): includes modified.yaml, specifies property "p" - - From the top-level binding, we expect: - - "x" was last modified in modified.yaml - - "y" was last modified in base.yaml - - "p" was last modified in top.yaml - -compatible: top-level - -include: modified.yaml - -properties: - p: - type: int diff --git a/scripts/dts/python-devicetree/tests/test_edtlib.py b/scripts/dts/python-devicetree/tests/test_edtlib.py index acf47ba6265552..80709feac0907a 100644 --- a/scripts/dts/python-devicetree/tests/test_edtlib.py +++ b/scripts/dts/python-devicetree/tests/test_edtlib.py @@ -365,18 +365,6 @@ def test_include_filters(): assert set(child.prop2specs.keys()) == {'child-prop-1', 'child-prop-2', 'x', 'z'} # root level 'y' is blocked -def test_include_paths(): - '''Test "last modified" semantic for included bindings paths.''' - - fname2path = {'base.yaml': 'test-bindings-include/base.yaml', - 'modified.yaml': 'test-bindings-include/modified.yaml'} - - with from_here(): - top = edtlib.Binding('test-bindings-include/top.yaml', fname2path) - - assert 'modified.yaml' == os.path.basename(top.prop2specs["x"].path) - assert 'base.yaml' == os.path.basename(top.prop2specs["y"].path) - assert 'top.yaml' == os.path.basename(top.prop2specs["p"].path) def test_bus(): '''Test 'bus:' and 'on-bus:' in bindings'''