Re: [PATCH 3/3] test: cmd: Add test for zip/unzip/gzwrite commands

Mattijs Korpershoek
2026-01-29T19:34:22Z

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