From 544dec27783e6f75a4366a949ef416f35e1a9638 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 6 Mar 2026 11:12:43 -0700 Subject: binman: test: Move symbol test files to test/symbols/ Move about 10 test files for binman symbol patching into a symbols/ subdirectory. Drop the numeric prefixes and the redundant symbols_ filename prefix, and update all references. Signed-off-by: Simon Glass Reviewed-by: Quentin Schulz --- tools/binman/ftest.py | 24 ++++++++++++------------ tools/binman/test/053_symbols.dts | 20 -------------------- tools/binman/test/149_symbols_tpl.dts | 27 --------------------------- tools/binman/test/187_symbols_sub.dts | 22 ---------------------- tools/binman/test/196_symbols_nodtb.dts | 26 -------------------------- tools/binman/test/197_symbols_expand.dts | 23 ----------------------- tools/binman/test/260_symbols_elf.dts | 27 --------------------------- tools/binman/test/282_symbols_disable.dts | 25 ------------------------- tools/binman/test/336_symbols_base.dts | 23 ----------------------- tools/binman/test/337_symbols_base_expand.dts | 24 ------------------------ tools/binman/test/338_symbols_comp.dts | 26 -------------------------- tools/binman/test/symbols/base.dts | 23 +++++++++++++++++++++++ tools/binman/test/symbols/base_expand.dts | 24 ++++++++++++++++++++++++ tools/binman/test/symbols/comp.dts | 26 ++++++++++++++++++++++++++ tools/binman/test/symbols/disable.dts | 25 +++++++++++++++++++++++++ tools/binman/test/symbols/elf.dts | 27 +++++++++++++++++++++++++++ tools/binman/test/symbols/expand.dts | 23 +++++++++++++++++++++++ tools/binman/test/symbols/nodtb.dts | 26 ++++++++++++++++++++++++++ tools/binman/test/symbols/sub.dts | 22 ++++++++++++++++++++++ tools/binman/test/symbols/symbols.dts | 20 ++++++++++++++++++++ tools/binman/test/symbols/tpl.dts | 27 +++++++++++++++++++++++++++ 21 files changed, 255 insertions(+), 255 deletions(-) delete mode 100644 tools/binman/test/053_symbols.dts delete mode 100644 tools/binman/test/149_symbols_tpl.dts delete mode 100644 tools/binman/test/187_symbols_sub.dts delete mode 100644 tools/binman/test/196_symbols_nodtb.dts delete mode 100644 tools/binman/test/197_symbols_expand.dts delete mode 100644 tools/binman/test/260_symbols_elf.dts delete mode 100644 tools/binman/test/282_symbols_disable.dts delete mode 100644 tools/binman/test/336_symbols_base.dts delete mode 100644 tools/binman/test/337_symbols_base_expand.dts delete mode 100644 tools/binman/test/338_symbols_comp.dts create mode 100644 tools/binman/test/symbols/base.dts create mode 100644 tools/binman/test/symbols/base_expand.dts create mode 100644 tools/binman/test/symbols/comp.dts create mode 100644 tools/binman/test/symbols/disable.dts create mode 100644 tools/binman/test/symbols/elf.dts create mode 100644 tools/binman/test/symbols/expand.dts create mode 100644 tools/binman/test/symbols/nodtb.dts create mode 100644 tools/binman/test/symbols/sub.dts create mode 100644 tools/binman/test/symbols/symbols.dts create mode 100644 tools/binman/test/symbols/tpl.dts (limited to 'tools') diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 3743071eb85..0e4f349aae9 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -1611,11 +1611,11 @@ class TestFunctional(unittest.TestCase): def testSymbols(self): """Test binman can assign symbols embedded in U-Boot""" - self.checkSymbols('053_symbols.dts', U_BOOT_SPL_DATA, 0x1c) + self.checkSymbols('symbols/symbols.dts', U_BOOT_SPL_DATA, 0x1c) def testSymbolsNoDtb(self): """Test binman can assign symbols embedded in U-Boot SPL""" - self.checkSymbols('196_symbols_nodtb.dts', + self.checkSymbols('symbols/nodtb.dts', U_BOOT_SPL_NODTB_DATA + U_BOOT_SPL_DTB_DATA, 0x38) @@ -3833,7 +3833,7 @@ class TestFunctional(unittest.TestCase): """Test binman can assign symbols embedded in U-Boot TPL in a section""" self._SetupSplElf('u_boot_binman_syms') self._SetupTplElf('u_boot_binman_syms') - self._CheckSymbolsTplSection('149_symbols_tpl.dts', + self._CheckSymbolsTplSection('symbols/tpl.dts', [0x04, 0x20, 0x10 + 0x3c, 0x04]) def testSymbolsTplSectionX86(self): @@ -4756,7 +4756,7 @@ class TestFunctional(unittest.TestCase): def testSymbolsSubsection(self): """Test binman can assign symbols from a subsection""" - self.checkSymbols('187_symbols_sub.dts', U_BOOT_SPL_DATA, 0x1c) + self.checkSymbols('symbols/sub.dts', U_BOOT_SPL_DATA, 0x1c) def testReadImageEntryArg(self): """Test reading an image that would need an entry arg to generate""" @@ -5007,7 +5007,7 @@ class TestFunctional(unittest.TestCase): entry_args = { 'spl-dtb': '1', } - self.checkSymbols('197_symbols_expand.dts', U_BOOT_SPL_NODTB_DATA + + self.checkSymbols('symbols/expand.dts', U_BOOT_SPL_NODTB_DATA + U_BOOT_SPL_DTB_DATA, 0x38, entry_args=entry_args, use_expanded=True) @@ -6406,7 +6406,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self._SetupTplElf('u_boot_binman_syms') self._SetupVplElf('u_boot_binman_syms') self._SetupSplElf('u_boot_binman_syms') - data = self._DoReadFileDtb('260_symbols_elf.dts')[0] + data = self._DoReadFileDtb('symbols/elf.dts')[0] image_fname = tools.get_output_filename('image.bin') image = control.images['image'] @@ -6449,7 +6449,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap try: elf.ELF_TOOLS = False with self.assertRaises(ValueError) as exc: - self._DoReadFileDtb('260_symbols_elf.dts') + self._DoReadFileDtb('symbols/elf.dts') finally: elf.ELF_TOOLS = True self.assertIn( @@ -6987,7 +6987,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testSymbolNoWrite(self): """Test disabling of symbol writing""" self._SetupSplElf() - self.checkSymbols('282_symbols_disable.dts', U_BOOT_SPL_DATA, 0x1c, + self.checkSymbols('symbols/disable.dts', U_BOOT_SPL_DATA, 0x1c, no_write_symbols=True) def testSymbolNoWriteExpanded(self): @@ -6995,7 +6995,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap entry_args = { 'spl-dtb': '1', } - self.checkSymbols('282_symbols_disable.dts', U_BOOT_SPL_NODTB_DATA + + self.checkSymbols('symbols/disable.dts', U_BOOT_SPL_NODTB_DATA + U_BOOT_SPL_DTB_DATA, 0x38, entry_args=entry_args, use_expanded=True, no_write_symbols=True) @@ -7874,7 +7874,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testSymbolsBase(self): """Test handling of symbols-base""" - self.checkSymbols('336_symbols_base.dts', U_BOOT_SPL_DATA, 0x1c, + self.checkSymbols('symbols/base.dts', U_BOOT_SPL_DATA, 0x1c, symbols_base=0) def testSymbolsBaseExpanded(self): @@ -7882,7 +7882,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap entry_args = { 'spl-dtb': '1', } - self.checkSymbols('337_symbols_base_expand.dts', U_BOOT_SPL_NODTB_DATA + + self.checkSymbols('symbols/base_expand.dts', U_BOOT_SPL_NODTB_DATA + U_BOOT_SPL_DTB_DATA, 0x38, entry_args=entry_args, use_expanded=True, symbols_base=0) @@ -7890,7 +7890,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testSymbolsCompressed(self): """Test binman complains about symbols from a compressed section""" with terminal.capture() as (stdout, stderr): - self.checkSymbols('338_symbols_comp.dts', U_BOOT_SPL_DATA, None) + self.checkSymbols('symbols/comp.dts', U_BOOT_SPL_DATA, None) out = stdout.getvalue() self.assertIn('Symbol-writing: no value for /binman/section/u-boot', out) diff --git a/tools/binman/test/053_symbols.dts b/tools/binman/test/053_symbols.dts deleted file mode 100644 index b28f34a72fa..00000000000 --- a/tools/binman/test/053_symbols.dts +++ /dev/null @@ -1,20 +0,0 @@ -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - pad-byte = <0xff>; - u-boot-spl { - }; - - u-boot { - offset = <0x1c>; - }; - - u-boot-spl2 { - type = "u-boot-spl"; - }; - }; -}; diff --git a/tools/binman/test/149_symbols_tpl.dts b/tools/binman/test/149_symbols_tpl.dts deleted file mode 100644 index 4e649c45978..00000000000 --- a/tools/binman/test/149_symbols_tpl.dts +++ /dev/null @@ -1,27 +0,0 @@ -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - pad-byte = <0xff>; - u-boot-spl { - offset = <4>; - }; - - u-boot-spl2 { - offset = <0x20>; - type = "u-boot-spl"; - }; - - u-boot { - offset = <0x3c>; - }; - - section { - u-boot-tpl { - }; - }; - }; -}; diff --git a/tools/binman/test/187_symbols_sub.dts b/tools/binman/test/187_symbols_sub.dts deleted file mode 100644 index 3ab62d37215..00000000000 --- a/tools/binman/test/187_symbols_sub.dts +++ /dev/null @@ -1,22 +0,0 @@ -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - section { - pad-byte = <0xff>; - u-boot-spl { - }; - - u-boot { - offset = <28>; - }; - }; - - u-boot-spl2 { - type = "u-boot-spl"; - }; - }; -}; diff --git a/tools/binman/test/196_symbols_nodtb.dts b/tools/binman/test/196_symbols_nodtb.dts deleted file mode 100644 index 5c900d60709..00000000000 --- a/tools/binman/test/196_symbols_nodtb.dts +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - pad-byte = <0xff>; - u-boot-spl-nodtb { - }; - u-boot-spl-dtb { - }; - - u-boot { - offset = <0x38>; - }; - - u-boot-spl2 { - type = "u-boot-spl-nodtb"; - }; - u-boot-spl-dtb2 { - type = "u-boot-spl-dtb"; - }; - }; -}; diff --git a/tools/binman/test/197_symbols_expand.dts b/tools/binman/test/197_symbols_expand.dts deleted file mode 100644 index 8aee76dc755..00000000000 --- a/tools/binman/test/197_symbols_expand.dts +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - pad-byte = <0xff>; - u-boot-spl { - }; - - u-boot { - offset = <0x38>; - no-expanded; - }; - - u-boot-spl2 { - type = "u-boot-spl"; - }; - }; -}; diff --git a/tools/binman/test/260_symbols_elf.dts b/tools/binman/test/260_symbols_elf.dts deleted file mode 100644 index 0fae118fc12..00000000000 --- a/tools/binman/test/260_symbols_elf.dts +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - pad-byte = <0xff>; - u-boot-spl-elf { - }; - - u-boot { - }; - - u-boot-spl2 { - type = "u-boot-spl-elf"; - }; - - u-boot-tpl-elf { - }; - - u-boot-vpl-elf { - }; - }; -}; diff --git a/tools/binman/test/282_symbols_disable.dts b/tools/binman/test/282_symbols_disable.dts deleted file mode 100644 index 6efa9335041..00000000000 --- a/tools/binman/test/282_symbols_disable.dts +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - pad-byte = <0xff>; - u-boot-spl { - no-write-symbols; - }; - - u-boot { - offset = <0x38>; - no-expanded; - }; - - u-boot-spl2 { - type = "u-boot-spl"; - no-write-symbols; - }; - }; -}; diff --git a/tools/binman/test/336_symbols_base.dts b/tools/binman/test/336_symbols_base.dts deleted file mode 100644 index e4dccd38c22..00000000000 --- a/tools/binman/test/336_symbols_base.dts +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - pad-byte = <0xff>; - u-boot-spl { - symbols-base = <0>; - }; - - u-boot { - offset = <0x1c>; - }; - - u-boot-spl2 { - type = "u-boot-spl"; - }; - }; -}; diff --git a/tools/binman/test/337_symbols_base_expand.dts b/tools/binman/test/337_symbols_base_expand.dts deleted file mode 100644 index 5a777ae63b8..00000000000 --- a/tools/binman/test/337_symbols_base_expand.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - pad-byte = <0xff>; - u-boot-spl { - symbols-base = <0>; - }; - - u-boot { - offset = <0x38>; - no-expanded; - }; - - u-boot-spl2 { - type = "u-boot-spl"; - }; - }; -}; diff --git a/tools/binman/test/338_symbols_comp.dts b/tools/binman/test/338_symbols_comp.dts deleted file mode 100644 index 15008507cfd..00000000000 --- a/tools/binman/test/338_symbols_comp.dts +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; - -/ { - #address-cells = <1>; - #size-cells = <1>; - - binman { - pad-byte = <0xff>; - u-boot-spl { - }; - - section { - offset = <0x1c>; - compress = "lz4"; - - u-boot { - }; - }; - - u-boot-spl2 { - type = "u-boot-spl"; - }; - }; -}; diff --git a/tools/binman/test/symbols/base.dts b/tools/binman/test/symbols/base.dts new file mode 100644 index 00000000000..e4dccd38c22 --- /dev/null +++ b/tools/binman/test/symbols/base.dts @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + pad-byte = <0xff>; + u-boot-spl { + symbols-base = <0>; + }; + + u-boot { + offset = <0x1c>; + }; + + u-boot-spl2 { + type = "u-boot-spl"; + }; + }; +}; diff --git a/tools/binman/test/symbols/base_expand.dts b/tools/binman/test/symbols/base_expand.dts new file mode 100644 index 00000000000..5a777ae63b8 --- /dev/null +++ b/tools/binman/test/symbols/base_expand.dts @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + pad-byte = <0xff>; + u-boot-spl { + symbols-base = <0>; + }; + + u-boot { + offset = <0x38>; + no-expanded; + }; + + u-boot-spl2 { + type = "u-boot-spl"; + }; + }; +}; diff --git a/tools/binman/test/symbols/comp.dts b/tools/binman/test/symbols/comp.dts new file mode 100644 index 00000000000..15008507cfd --- /dev/null +++ b/tools/binman/test/symbols/comp.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + pad-byte = <0xff>; + u-boot-spl { + }; + + section { + offset = <0x1c>; + compress = "lz4"; + + u-boot { + }; + }; + + u-boot-spl2 { + type = "u-boot-spl"; + }; + }; +}; diff --git a/tools/binman/test/symbols/disable.dts b/tools/binman/test/symbols/disable.dts new file mode 100644 index 00000000000..6efa9335041 --- /dev/null +++ b/tools/binman/test/symbols/disable.dts @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + pad-byte = <0xff>; + u-boot-spl { + no-write-symbols; + }; + + u-boot { + offset = <0x38>; + no-expanded; + }; + + u-boot-spl2 { + type = "u-boot-spl"; + no-write-symbols; + }; + }; +}; diff --git a/tools/binman/test/symbols/elf.dts b/tools/binman/test/symbols/elf.dts new file mode 100644 index 00000000000..0fae118fc12 --- /dev/null +++ b/tools/binman/test/symbols/elf.dts @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + pad-byte = <0xff>; + u-boot-spl-elf { + }; + + u-boot { + }; + + u-boot-spl2 { + type = "u-boot-spl-elf"; + }; + + u-boot-tpl-elf { + }; + + u-boot-vpl-elf { + }; + }; +}; diff --git a/tools/binman/test/symbols/expand.dts b/tools/binman/test/symbols/expand.dts new file mode 100644 index 00000000000..8aee76dc755 --- /dev/null +++ b/tools/binman/test/symbols/expand.dts @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + pad-byte = <0xff>; + u-boot-spl { + }; + + u-boot { + offset = <0x38>; + no-expanded; + }; + + u-boot-spl2 { + type = "u-boot-spl"; + }; + }; +}; diff --git a/tools/binman/test/symbols/nodtb.dts b/tools/binman/test/symbols/nodtb.dts new file mode 100644 index 00000000000..5c900d60709 --- /dev/null +++ b/tools/binman/test/symbols/nodtb.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + pad-byte = <0xff>; + u-boot-spl-nodtb { + }; + u-boot-spl-dtb { + }; + + u-boot { + offset = <0x38>; + }; + + u-boot-spl2 { + type = "u-boot-spl-nodtb"; + }; + u-boot-spl-dtb2 { + type = "u-boot-spl-dtb"; + }; + }; +}; diff --git a/tools/binman/test/symbols/sub.dts b/tools/binman/test/symbols/sub.dts new file mode 100644 index 00000000000..3ab62d37215 --- /dev/null +++ b/tools/binman/test/symbols/sub.dts @@ -0,0 +1,22 @@ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + section { + pad-byte = <0xff>; + u-boot-spl { + }; + + u-boot { + offset = <28>; + }; + }; + + u-boot-spl2 { + type = "u-boot-spl"; + }; + }; +}; diff --git a/tools/binman/test/symbols/symbols.dts b/tools/binman/test/symbols/symbols.dts new file mode 100644 index 00000000000..b28f34a72fa --- /dev/null +++ b/tools/binman/test/symbols/symbols.dts @@ -0,0 +1,20 @@ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + pad-byte = <0xff>; + u-boot-spl { + }; + + u-boot { + offset = <0x1c>; + }; + + u-boot-spl2 { + type = "u-boot-spl"; + }; + }; +}; diff --git a/tools/binman/test/symbols/tpl.dts b/tools/binman/test/symbols/tpl.dts new file mode 100644 index 00000000000..4e649c45978 --- /dev/null +++ b/tools/binman/test/symbols/tpl.dts @@ -0,0 +1,27 @@ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + pad-byte = <0xff>; + u-boot-spl { + offset = <4>; + }; + + u-boot-spl2 { + offset = <0x20>; + type = "u-boot-spl"; + }; + + u-boot { + offset = <0x3c>; + }; + + section { + u-boot-tpl { + }; + }; + }; +}; -- cgit v1.2.3