binman: Add test for u-boot-spl-bss-pad
Add a test that we can pad the BSS with zero bytes.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 539ebc5..4e6aaad 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -88,6 +88,10 @@
with open(self.TestFile('descriptor.bin')) as fd:
TestFunctional._MakeInputFile('descriptor.bin', fd.read())
+ # ELF file with a '__bss_size' symbol
+ with open(self.TestFile('bss_data')) as fd:
+ TestFunctional._MakeInputFile('spl/u-boot-spl', fd.read())
+
@classmethod
def tearDownClass(self):
"""Remove the temporary input directory and its contents"""
@@ -814,6 +818,11 @@
data = self._DoReadFile('46_intel-vbt.dts')
self.assertEqual(VBT_DATA, data[:len(VBT_DATA)])
+ def testSplBssPad(self):
+ """Test that we can pad SPL's BSS with zeros"""
+ data = self._DoReadFile('47_spl_bss_pad.dts')
+ self.assertEqual(U_BOOT_SPL_DATA + (chr(0) * 10) + U_BOOT_DATA, data)
+
if __name__ == "__main__":
unittest.main()