Skip to content

Commit 007f9a0

Browse files
Trotttargos
authored andcommitted
test: fix test-vm-memleak for high baseline platforms
test-vm-memleak always fails on AIX in CI because the test checks that total memory consumption is less than 64 Mb, but AIX uses over 100 Mb just as a baseline. So instead, let's compare the memory consumption to the baseline and make sure it is within 32 Mb. PR-URL: #38062 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Ash Cripps <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 0fabd8e commit 007f9a0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/pummel/test-vm-memleak.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ if (process.config.variables.asan) {
3131
const assert = require('assert');
3232
const vm = require('vm');
3333

34+
const baselineRss = process.memoryUsage.rss();
35+
3436
const start = Date.now();
3537

3638
const interval = setInterval(function() {
@@ -41,8 +43,8 @@ const interval = setInterval(function() {
4143

4244
global.gc();
4345
const rss = process.memoryUsage.rss();
44-
assert.ok(rss < 64 * 1024 * 1024,
45-
`memory usage: ${rss} (${Math.round(rss / (1024 * 1024))} MB)`);
46+
assert.ok(rss < baselineRss + 32 * 1024 * 1024,
47+
`memory usage: ${rss} baseline: ${baselineRss}`);
4648

4749
// Stop after 5 seconds.
4850
if (Date.now() - start > 5 * 1000) {

0 commit comments

Comments
 (0)