1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

tests/leaks.sh: fix intermittent fails on Gentoo (re: 005d38f41)

This applies when ksh is compiled with standard malloc.

Apparently, 1024 iterations is not enough on Gentoo Linux i386, at
least not when running the full test suite. The leak tests fail
intermittently and different tests fail each time, but always with
a leak of exactly 36864 bytes for each failing test. So those
failures are clearly spurious. Doubling the number of iterations
seems to make them go away.
This commit is contained in:
Martijn Dekker 2021-05-03 16:55:42 +01:00
parent dd5455ac5f
commit 6d54faf9f5

View file

@ -35,7 +35,7 @@ then N=512 # number of iterations for each test
} }
# On Linux, we can use /proc to get byte granularity for vsize (field 23). # On Linux, we can use /proc to get byte granularity for vsize (field 23).
elif [[ -f /proc/$$/stat && $(uname) == Linux ]] elif [[ -f /proc/$$/stat && $(uname) == Linux ]]
then N=1024 # number of iterations for each test then N=2048 # number of iterations for each test
unit=bytes unit=bytes
tolerance=$((4*N)) # tolerate 4 bytes per iteration to account for malloc artefacts tolerance=$((4*N)) # tolerate 4 bytes per iteration to account for malloc artefacts
function getmem function getmem