diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-18 07:24:01 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-07-20 14:10:58 -0600 |
commit | e1ad57e7ef6e17fb6f55bf70fff61bfd93703b78 (patch) | |
tree | dc1b6d25358b3b217d2d9bc970482dc128e4c9bf /tools/binman/ftest.py | |
parent | 073fc36c17cfa283e8aff3aec522a9614e915542 (diff) |
binman: Correct handling of zero bss size
Fix the check for the __bss_size symbol, since it may be 0. Unfortunately
there was no test coverage for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index ed1940ed9f7..dc9a95d341e 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -6773,6 +6773,18 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self.assertEqual(U_BOOT_NODTB_DATA, data[-len(U_BOOT_NODTB_DATA):]) fit_data = data[len(U_BOOT_DATA):-len(U_BOOT_NODTB_DATA)] + def testSplEmptyBss(self): + """Test an expanded SPL with a zero-size BSS""" + # ELF file with a '__bss_size' symbol + self._SetupSplElf(src_fname='bss_data_zero') + + entry_args = { + 'spl-bss-pad': 'y', + 'spl-dtb': 'y', + } + data = self._DoReadFileDtb('285_spl_expand.dts', + use_expanded=True, entry_args=entry_args)[0] + if __name__ == "__main__": unittest.main() |