]> git.baikalelectronics.ru Git - uboot.git/commit
test: compression: check with trailing garbage in input
authorBrandon Maier <brandon.maier@collins.com>
Wed, 28 Dec 2022 22:53:51 +0000 (16:53 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 11 Jan 2023 20:02:24 +0000 (15:02 -0500)
commit24fd0cb9b3c031305fc734c8e98d1d2364a011aa
tree99d716e96e11513be337c314ef06ec571f5e4cb9
parent4b889108d8258562ad548e3884ae059ea1a84939
test: compression: check with trailing garbage in input

The Linux kernel appends 4 bytes to the end of compressed kernel Images
containing the uncompressed image size. They are used to make
self-decompressing Images easier. However for archs that don't support
self-decompression, like ARM64, U-Boot must be able to decompress the
image with the garbage data.

The existing decompressors already support this. This unit test was
added while working on zstd support as upstream zstd will error if there
is garbage data in the input buffer, and special care was needed to
support this.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
test/compression.c