From 56509843003570f57f8600642258c77d525da0e5 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 12 Nov 2017 21:52:25 -0700 Subject: 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 --- tools/binman/ftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/binman/ftest.py') diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 539ebc57f57..4e6aaad9d6b 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -88,6 +88,10 @@ class TestFunctional(unittest.TestCase): 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 @@ class TestFunctional(unittest.TestCase): 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() -- cgit v1.2.3