1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

tests/leaks.sh: tweak Linux tolerance again (re: 31fe1c28)

The referenced commit did not fix the symptoms on the 1.0 branch
(no vmalloc) on the GitHub CI runners.

The failures are intermittent and are not reproduced with vmalloc
or on other operating systems.

Though the failures occur on a different test each time, the total
amount of "leaked" bytes is always 36864, e.g.:

    leaks.sh[388]: run command with preceding PATH assignment in
    main shell (leaked approx 36864 bytes after 4096 iterations)

36864/4096 equals exactly 9. An odd number, literally and
figuratively, but I suppose that's the tolerance Linux needs.

src/cmd/ksh93/tests/leaks.sh
- Increase tolerance of bytes per iteration from 8 to 9.
This commit is contained in:
Martijn Dekker 2021-11-19 19:03:38 +01:00
parent 396b388e1f
commit 6829fc9a29

View file

@ -38,7 +38,7 @@ then N=512 # number of iterations for each test
elif [[ -f /proc/$$/stat && $(uname) == Linux ]]
then N=4096 # number of iterations for each test
unit=bytes
tolerance=$((8*N)) # tolerate 8 bytes per iteration to account for malloc artefacts
tolerance=$((9*N)) # tolerate 9 bytes per iteration to account for malloc artefacts
function getmem
{
cut -f 23 -d ' ' </proc/$$/stat