From 31fe1c289071a3f09e61a79bf0b6075016a420ed Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Mon, 15 Nov 2021 03:00:40 +0100 Subject: [PATCH] tests/leaks.sh: increase iterations on Linux There are one or two leaks that show up intermittently on the Github runners for the 1.0 branch (which is compiled as a release, i.e. no vmalloc). If they're intermittent, they must be false positives due to malloc artefacts. Let's double the number of iterations for the /proc/$$/stat method and see what happens. --- src/cmd/ksh93/tests/leaks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/ksh93/tests/leaks.sh b/src/cmd/ksh93/tests/leaks.sh index 91a815a62..91d1145e0 100755 --- a/src/cmd/ksh93/tests/leaks.sh +++ b/src/cmd/ksh93/tests/leaks.sh @@ -36,7 +36,7 @@ then N=512 # number of iterations for each test } # On Linux, we can use /proc to get byte granularity for vsize (field 23). elif [[ -f /proc/$$/stat && $(uname) == Linux ]] -then N=2048 # number of iterations for each test +then N=4096 # number of iterations for each test unit=bytes tolerance=$((8*N)) # tolerate 8 bytes per iteration to account for malloc artefacts function getmem