facebook / facebook/zstd

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

Aperta
#4,748 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C
Stelle
27.9k
Fork
2.6k
Merge medio
1g 3h
PR unite (30g)
8

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.