public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Marek Vasut <marek.vasut@mailbox.org>,
	Mattijs Korpershoek <mkorpershoek@kernel.org>,
	u-boot@lists.denx.de
Cc: Alexander Graf <agraf@csgraf.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Jerome Forissier <jerome@forissier.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Peng Fan <peng.fan@nxp.com>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
	Yuya Hamamachi <yuya.hamamachi.sx@renesas.com>
Subject: Re: [PATCH 3/3] test: cmd: Add test for zip/unzip/gzwrite commands
Date: Thu, 29 Jan 2026 20:34:13 +0100	[thread overview]
Message-ID: <87ldhgmcwa.fsf@kernel.org> (raw)
In-Reply-To: <c4745b73-c85a-4917-b47c-85c1acce2f3e@mailbox.org>

On Thu, Jan 29, 2026 at 17:31, Marek Vasut <marek.vasut@mailbox.org> wrote:

> On 1/29/26 5:26 PM, Mattijs Korpershoek wrote:
>
> Hi,
>
>> On Wed, Jan 28, 2026 at 00:57, Marek Vasut <marek.vasut+renesas@mailbox.org> wrote:
>> 
>>> Add simple test for zip/unzip/gzwrite commands. The test works as
>>> follows. First, create three buffers with a bit of space between
>>> each of them, fill them with random data, then compress data in
>>> buffer 1 into buffer 2, decompress data in buffer 2 either directly
>>> into buffer 3 or into MMC 1 and then read them back into buffer 3,
>>> and finally compare buffer 1 and buffer 3, they have to be identical.
>>>
>>> The buffers are filled with random data to detect out of bounds writes.
>>> Test for various sizes, both small and large and unaligned.
>>>
>>> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
>> 
>> I've tested this with
>> 
>> $ ./test/py/test.py --bd sandbox --build -k ut
>> 
>> Followed by:
>> 
>> $ ./test/py/test.py --bd sandbox --build -k cmd_zip
>> 
>> And I see:
>> 
>> FAILED test/py/tests/test_ut.py::test_ut[ut_dm_dm_test_cmd_zip_gzwrite] - ValueError: U-Boot exited with signal 11 (SIGSEGV)
>> FAILED test/py/tests/test_ut.py::test_ut[ut_dm_dm_test_cmd_zip_unzip] - ValueError: U-Boot exited with signal 11 (SIGSEGV)
> You will also need these four fixes, then it should work:
>
> cmd: zip: Add missing unmap_sysmem() for buffers in the unzip command
> cmd: zip: Use map_sysmem() with buffers in the zip command
> cmd: unzip: Use map_sysmem() with buffers in the gzwrite command
> gunzip: Fix len parameter in function signature

Indeed, when these four fixes are applied first, the tests pass:

test/py/tests/test_ut.py ..                                                                                                                                                                                                                                                                                            [100%]

============================================================================================================================================= 2 passed, 1464 deselected in 1.41

Can you mark these patches as dependencies of this series for v2?

Thanks
Mattijs

  reply	other threads:[~2026-01-29 19:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27 23:57 [PATCH 1/3] gunzip: Add ability to disable progress indicator Marek Vasut
2026-01-27 23:57 ` [PATCH 2/3] configs: sandbox: Enable zip command Marek Vasut
2026-01-29 16:17   ` Mattijs Korpershoek
2026-01-27 23:57 ` [PATCH 3/3] test: cmd: Add test for zip/unzip/gzwrite commands Marek Vasut
2026-01-29 16:26   ` Mattijs Korpershoek
2026-01-29 16:31     ` Marek Vasut
2026-01-29 19:34       ` Mattijs Korpershoek [this message]
2026-01-29 19:43         ` Marek Vasut
2026-01-29 16:17 ` [PATCH 1/3] gunzip: Add ability to disable progress indicator Mattijs Korpershoek
2026-01-29 16:33   ` Marek Vasut
2026-01-29 16:53     ` Tom Rini
2026-01-29 16:57       ` Marek Vasut
2026-01-29 17:16         ` Tom Rini
2026-01-29 17:25           ` Marek Vasut
2026-01-29 19:21     ` Mattijs Korpershoek

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=87ldhgmcwa.fsf@kernel.org \
    --to=mkorpershoek@kernel.org \
    --cc=agraf@csgraf.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jerome@forissier.org \
    --cc=marek.vasut@mailbox.org \
    --cc=neil.armstrong@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=quentin.schulz@cherry.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=yuya.hamamachi.sx@renesas.com \
    /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