diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2025-04-10 06:43:03 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-11 14:29:52 -0600 |
commit | 06a0d9eee835b5b6242e773cbab34ec9aba19443 (patch) | |
tree | 550fc7335fb00fcf130df5457d93f3f96b02ed08 /tools/binman/ftest.py | |
parent | 702b7a3e2eb49b144936e061c0107518544c4b1a (diff) |
binman: Workaround lz4 cli padding in test cases
Newer lz4 util is not happy with any padding at end of file,
it would abort with error message like:
Stream followed by undecodable data at position 43.
Workaround by skipping testCompUtilPadding test case and manually
strip padding in testCompressSectionSize test case.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 948fcc02259..92df2a03650 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -4613,6 +4613,8 @@ class TestFunctional(unittest.TestCase): dtb.Scan() props = self._GetPropTree(dtb, ['offset', 'image-pos', 'size', 'uncomp-size']) + data = data[:0x30] + data = data.rstrip(b'\xff') orig = self._decompress(data) self.assertEqual(COMPRESS_DATA + U_BOOT_DATA, orig) expected = { @@ -6218,8 +6220,9 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testCompUtilPadding(self): """Test padding of compression algorithms""" - # Skip zstd because it doesn't support padding - for bintool in [v for k,v in self.comp_bintools.items() if k != 'zstd']: + # Skip zstd and lz4 because they doesn't support padding + for bintool in [v for k,v in self.comp_bintools.items() + if not k in ['zstd', 'lz4']]: self._CheckBintool(bintool) data = bintool.compress(COMPRESS_DATA) self.assertNotEqual(COMPRESS_DATA, data) |