diff options
author | Simon Glass | 2017-11-12 21:52:25 -0700 |
---|---|---|
committer | Simon Glass | 2017-11-22 18:05:38 -0700 |
commit | 56509843003570f57f8600642258c77d525da0e5 (patch) | |
tree | 0b2b2566f34c5ac83aba52b4f217f86f0decfafa /tools/binman/ftest.py | |
parent | a25ebed36fcf95d09629e8d2e95fdf4907798fb5 (diff) |
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>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 9 |
1 files changed, 9 insertions, 0 deletions
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() |