[zlib] Add large payloads and compression levels unit tests

Larger payloads (i.e. bigger than 500KB) are helpful to detect programming
issues in checksums (i.e. overflows) and this patch adds a new unit test
to cover bigger payloads (6KB to 20MB).

It also adds a new unit test to cover all the 9 compression levels supported
by zlib (Z_DEFAULT_COMPRESSION is level 6).

The new tests takes near 6s (3300ms + 3200ms) to run in a K230 board, but it is way faster in any decent modern CPU (i.e. 314ms + 320ms on
Intel i7 11th gen).

Bug: 329282661
Change-Id: I4d851799ae10f98d90b114560bed9ad48896e39d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5436095
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1284921}
NOKEYCHECK=True
GitOrigin-RevId: 2f4df1ff700345b6e643af224a859f6be5c4fda1
1 file changed