From eb0086fa59e61561a5eca61b9ab8323d8a0cbf9c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Aug 2019 07:23:04 -0600 Subject: [PATCH] binman: Increase size of TPL and SPL test data At present these are large enough to hold 20 bytes of symbol data. Add four more bytes so we can add another test. Unfortunately at present this involves changing a few test files to make room. We could adjust the test files to not specify sizes for entries. Then we could make the tests check the actual sizes. But for now, leave it as it is, since the effort is minor. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 14 +++++++------- tools/binman/test/021_image_pad.dts | 2 +- tools/binman/test/024_sorted.dts | 2 +- tools/binman/test/028_pack_4gb_outside.dts | 2 +- tools/binman/test/029_x86_rom.dts | 2 +- tools/binman/test/053_symbols.dts | 2 +- tools/binman/test/149_symbols_tpl.dts | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 6b0ab7fdc2..5433c80e8e 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -39,8 +39,8 @@ import tout # Contents of test files, corresponding to different entry types U_BOOT_DATA = b'1234' U_BOOT_IMG_DATA = b'img' -U_BOOT_SPL_DATA = b'56780123456789abcde' -U_BOOT_TPL_DATA = b'tpl9876543210fedcb' +U_BOOT_SPL_DATA = b'56780123456789abcdefghi' +U_BOOT_TPL_DATA = b'tpl9876543210fedcbazyw' BLOB_DATA = b'89' ME_DATA = b'0abcd' VGA_DATA = b'vga' @@ -922,7 +922,7 @@ class TestFunctional(unittest.TestCase): """Test that a basic x86 ROM can be created""" self._SetupSplElf() data = self._DoReadFile('029_x86_rom.dts') - self.assertEqual(U_BOOT_DATA + tools.GetBytes(0, 7) + U_BOOT_SPL_DATA + + self.assertEqual(U_BOOT_DATA + tools.GetBytes(0, 3) + U_BOOT_SPL_DATA + tools.GetBytes(0, 2), data) def testPackX86RomMeNoDesc(self): @@ -1236,7 +1236,7 @@ class TestFunctional(unittest.TestCase): self._SetupSplElf('u_boot_binman_syms') data = self._DoReadFile('053_symbols.dts') - sym_values = struct.pack('; + offset = <24>; }; }; }; diff --git a/tools/binman/test/024_sorted.dts b/tools/binman/test/024_sorted.dts index d35d39f077..b79d9adf68 100644 --- a/tools/binman/test/024_sorted.dts +++ b/tools/binman/test/024_sorted.dts @@ -7,7 +7,7 @@ binman { sort-by-offset; u-boot { - offset = <22>; + offset = <26>; }; u-boot-spl { diff --git a/tools/binman/test/028_pack_4gb_outside.dts b/tools/binman/test/028_pack_4gb_outside.dts index 2216abfb70..11a1f6059e 100644 --- a/tools/binman/test/028_pack_4gb_outside.dts +++ b/tools/binman/test/028_pack_4gb_outside.dts @@ -13,7 +13,7 @@ }; u-boot-spl { - offset = <0xffffffeb>; + offset = <0xffffffe7>; }; }; }; diff --git a/tools/binman/test/029_x86_rom.dts b/tools/binman/test/029_x86_rom.dts index d5c69f9d4a..88aa007bba 100644 --- a/tools/binman/test/029_x86_rom.dts +++ b/tools/binman/test/029_x86_rom.dts @@ -13,7 +13,7 @@ }; u-boot-spl { - offset = <0xffffffeb>; + offset = <0xffffffe7>; }; }; }; diff --git a/tools/binman/test/053_symbols.dts b/tools/binman/test/053_symbols.dts index 9f135676cb..8af575158f 100644 --- a/tools/binman/test/053_symbols.dts +++ b/tools/binman/test/053_symbols.dts @@ -10,7 +10,7 @@ }; u-boot { - offset = <20>; + offset = <24>; }; u-boot-spl2 { diff --git a/tools/binman/test/149_symbols_tpl.dts b/tools/binman/test/149_symbols_tpl.dts index 087e10f292..dfc84af5e7 100644 --- a/tools/binman/test/149_symbols_tpl.dts +++ b/tools/binman/test/149_symbols_tpl.dts @@ -11,12 +11,12 @@ }; u-boot-spl2 { - offset = <0x18>; + offset = <0x1c>; type = "u-boot-spl"; }; u-boot { - offset = <0x30>; + offset = <0x34>; }; section { -- 2.25.1