This commit is contained in:
Meghan Denny
2025-11-15 04:06:09 -08:00
parent 1c6ce2dfe4
commit 25ddfc8c18
2 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,8 @@ import { isASAN } from "../../../harness";
const perBatch = 2000;
const repeat = 50;
test("Printing errors does not leak", () => {
// prettier-ignore
test.todoIf(isASAN)("Printing errors does not leak", () => {
function batch() {
for (let i = 0; i < perBatch; i++) {
Bun.inspect(new Error("leak"));
@@ -20,5 +21,5 @@ test("Printing errors does not leak", () => {
const after = Math.floor(process.memoryUsage.rss() / 1024);
const diff = ((after - baseline) / 1024) | 0;
console.log(`RSS increased by ${diff} MB`);
expect(diff, `RSS grew by ${diff} MB after ${perBatch * repeat} iterations`).toBeLessThan(isASAN ? 20 : 10);
expect(diff, `RSS grew by ${diff} MB after ${perBatch * repeat} iterations`).toBeLessThan(10);
}, 10_000);

View File

@@ -1698,8 +1698,9 @@ test/snippets/segfault-todo.test.js
test/js/bun/bun-object/write.spec.ts
test/js/bun/http/http-spec.ts
test/js/bun/stream/direct-readable-stream.test.tsx
test/js/node/cluster/test-worker-no-exit-http.ts
test/js/node/util/parse_args/default-args.test.mjs
test/js/node/test/parallel/test-abortsignal-any.mjs
test/js/node/test/parallel/test-arm-math-illegal-instruction.js