U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Simon Glass <sjg@chromium.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Simon Glass <sjg@chromium.org>,
	Alexander Kochetkov <al.kochet@gmail.com>,
	Alper Nebi Yasak <alpernebiyasak@gmail.com>,
	Brandon Maier <brandon.maier@collins.com>,
	Neha Malcom Francis <n-francis@ti.com>,
	Paul HENRYS <paul.henrys_ext@softathome.com>,
	Peng Fan <peng.fan@nxp.com>,
	Philippe Reynes <philippe.reynes@softathome.com>,
	Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH 5/7] binman: Workaround lz4 cli padding in test cases
Date: Thu, 10 Apr 2025 11:27:00 +0200	[thread overview]
Message-ID: <874iywgye3.fsf@baylibre.com> (raw)
In-Reply-To: <20250304130947.109799-6-sjg@chromium.org>

Hi Simon,

Thank you for the patch.

On mar., mars 04, 2025 at 06:09, Simon Glass <sjg@chromium.org> wrote:

> From: Jiaxun Yang <jiaxun.yang@flygoat.com>
>
> 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 that this solves issues when using lz4 1.9.4.

This patch solves:
https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/38

Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org>

> ---
>
>  tools/binman/ftest.py                           | 7 +++++--
>  tools/binman/test/184_compress_section_size.dts | 1 +
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
> index 1a92a99b511..e46a1e84372 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)
> diff --git a/tools/binman/test/184_compress_section_size.dts b/tools/binman/test/184_compress_section_size.dts
> index 95ed30add1a..1c1dbd5f580 100644
> --- a/tools/binman/test/184_compress_section_size.dts
> +++ b/tools/binman/test/184_compress_section_size.dts
> @@ -6,6 +6,7 @@
>  		section {
>  			size = <0x30>;
>  			compress = "lz4";
> +			pad-byte = <0xff>;
>  			blob {
>  				filename = "compress";
>  			};
> -- 
> 2.43.0

  reply	other threads:[~2025-04-10  9:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 13:09 [PATCH 0/7] binman: Check code-coverage requirements Simon Glass
2025-03-04 13:09 ` [PATCH 1/7] binman: Exclude dist-packages and site-packages Simon Glass
2025-03-04 13:09 ` [PATCH 2/7] binman: Drop GetRootSkipAtStart() Simon Glass
2025-03-04 13:09 ` [PATCH 3/7] binman: fit: Drop unused code Simon Glass
2025-03-04 13:09 ` [PATCH 4/7] binman: Drop algo check in CheckSetHashValue() Simon Glass
2025-03-04 13:09 ` [PATCH 5/7] binman: Workaround lz4 cli padding in test cases Simon Glass
2025-04-10  9:27   ` Mattijs Korpershoek [this message]
2025-04-10 14:53     ` Simon Glass
2025-04-10 15:07       ` Tom Rini
2025-03-04 13:09 ` [PATCH 6/7] binman: Work around missing test coverage Simon Glass
2025-03-04 13:09 ` [PATCH 7/7] CI: Run code-coverage test for Binman Simon Glass
2025-03-04 14:26   ` Tom Rini
2025-03-04 13:16 ` [PATCH 0/7] binman: Check code-coverage requirements Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2025-02-25 20:06 Simon Glass
2025-02-25 20:06 ` [PATCH 5/7] binman: Workaround lz4 cli padding in test cases Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874iywgye3.fsf@baylibre.com \
    --to=mkorpershoek@kernel.org \
    --cc=al.kochet@gmail.com \
    --cc=alpernebiyasak@gmail.com \
    --cc=brandon.maier@collins.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=n-francis@ti.com \
    --cc=paul.henrys_ext@softathome.com \
    --cc=peng.fan@nxp.com \
    --cc=philippe.reynes@softathome.com \
    --cc=sjg@chromium.org \
    --cc=stefan.herbrechtsmeier@weidmueller.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox