From b07d7b209798dbe6048e2a1aa4ccdd5695ddb3e2 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Sun, 31 Jul 2022 17:01:12 +0200 Subject: [PATCH] tests/leaks.sh: quadruple maximum number of test iterations There were still intermittent leak test failures on Debian. They're clearly spurious as a different test fails each time. My testing on a Debian 11.4.0 VM showed that it takes not a doubling, but a quadrupling of the maximum number of test iterations (from 16384==2**14 to 65536==2**16) for that system's memory state to stabilise enough to avoid spurious test failurese. Resolves: https://github.com/ksh93/ksh/issues/501 --- 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 746535024..4811314e6 100755 --- a/src/cmd/ksh93/tests/leaks.sh +++ b/src/cmd/ksh93/tests/leaks.sh @@ -66,7 +66,7 @@ fi # lucky. If the OS decides to randomly grow the memory heap, it may take more tries, but hopefully not more than # $max_iter iterations. If the loop counter reaches $max_iter, then we assume a memory leak and throw a test failure. -typeset -ir max_iter=16384 block_iter=128 min_good_blocks=16 +typeset -ir max_iter=65536 block_iter=128 min_good_blocks=16 # Set up test block construct. # Known leaks can be marked known=y to turn them into non-fail warnings.