facebook / facebook/zstd

cli-tests: levels.sh --max test fails on systems with < 10GB RAM

Abierto
#4,748 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C
Estrellas
27.9k
Forks
2.6k
Merge medio
1 d 3 h
PR fusionados (30 d)
8

Descripción

The compression/levels.sh cli-test unconditionally runs `zstd --max` on
64-bit systems, which allocates ~8.5GB. This fails on systems with less
than 10GB RAM (e.g. virtual machines, CI containers, embedded test
environments).

The test already handles the 32-bit case by skipping --max:

if echo "$version_info" | grep -q '32-bit'; then
# skip --max test: not enough address space
cp file-19.zst file-max.zst

A similar check for available memory would allow the rest of the test
(default levels, clamping, environment variables) to run on
memory-constrained systems:

if echo "$version_info" | grep -q '32-bit' || [ "$(awk '/MemTotal/{print $2}' /proc/meminfo)" -lt 10000000 ]; then
# skip --max test: not enough address space or memory (<10GB)
cp file-19.zst file-max.zst

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.