Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4651871

Browse filesBrowse files
Flarnatargos
authored andcommitted
test: avoid leftover report file
test-windows-failed-heap-allocation forces a out of mem crash resulting in a report file. To avoid a leftover in repo the child is started in a tmp folder like in test-report-fatal-error. PR-URL: #30925 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 78cf6d0 commit 4651871
Copy full SHA for 4651871

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-windows-failed-heap-allocation.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-windows-failed-heap-allocation.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ if (process.argv[2] === 'heapBomb') {
1414
fn(2);
1515
}
1616

17+
// Run child in tmpdir to avoid report files in repo
18+
const tmpdir = require('../common/tmpdir');
19+
tmpdir.refresh();
20+
1721
// --max-old-space-size=3 is the min 'old space' in V8, explodes fast
1822
const cmd = `"${process.execPath}" --max-old-space-size=3 "${__filename}"`;
19-
exec(`${cmd} heapBomb`, common.mustCall((err) => {
23+
exec(`${cmd} heapBomb`, { cwd: tmpdir.path }, common.mustCall((err) => {
2024
const msg = `Wrong exit code of ${err.code}! Expected 134 for abort`;
2125
// Note: common.nodeProcessAborted() is not asserted here because it
2226
// returns true on 134 as well as 0xC0000005 (V8's base::OS::Abort)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.