From 997e97d9cd8c687284feb32e364ef434086d38d5 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 2 Jun 2018 10:03:25 +0200 Subject: [PATCH] test: increase slop limit in memory leak test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It transpires that the extra bookkeeping in debug builds sometimes makes the increase in RSS go _just_ over the 5 MB limit, by fewer than 100 kB. Double the limit so we hopefully don't run into it any time again soon. The memory leak it tests for was one where RSS grew by hundreds of megabytes over the lifetime of the test; 5 vs. 10 MB is insignificant. Fixes: https://github.com/nodejs/node/issues/21076 PR-URL: https://github.com/nodejs/node/pull/21080 Refs: https://github.com/nodejs/node/issues/21076 Reviewed-By: Tobias Nießen Reviewed-By: Rich Trott Reviewed-By: Anatoli Papirovski Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Yuta Hiroto Reviewed-By: James M Snell Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Luigi Pinca --- test/parallel/test-crypto-dh-leak.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-crypto-dh-leak.js b/test/parallel/test-crypto-dh-leak.js index bcca210503299b..9ba8d29e155dc6 100644 --- a/test/parallel/test-crypto-dh-leak.js +++ b/test/parallel/test-crypto-dh-leak.js @@ -23,4 +23,4 @@ const after = process.memoryUsage().rss; // RSS should stay the same, ceteris paribus, but allow for // some slop because V8 mallocs memory during execution. -assert(after - before < 5 << 20, `before=${before} after=${after}`); +assert(after - before < 10 << 20, `before=${before} after=${after}`);