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 7af8738

Browse filesBrowse files
santigimenoMylesBorins
authored andcommitted
test: fix flaky test-child-process-exec-timeout
At least starting with Darwin Kernel Version 16.4.0, sending a SIGTERM to a process that is still starting up kills it with SIGKILL instead of SIGTERM. PR-URL: #12159 Refs: libuv/libuv#1226 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent d007427 commit 7af8738
Copy full SHA for 7af8738

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-child-process-exec-timeout.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-exec-timeout.js
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ const cmd = `${process.execPath} ${__filename} child`;
1818
cp.exec(cmd, { timeout: 1 }, common.mustCall((err, stdout, stderr) => {
1919
assert.strictEqual(err.killed, true);
2020
assert.strictEqual(err.code, null);
21-
assert.strictEqual(err.signal, 'SIGTERM');
21+
// At least starting with Darwin Kernel Version 16.4.0, sending a SIGTERM to a
22+
// process that is still starting up kills it with SIGKILL instead of SIGTERM.
23+
// See: https://github.com/libuv/libuv/issues/1226
24+
if (common.isOSX)
25+
assert.ok(err.signal === 'SIGTERM' || err.signal === 'SIGKILL');
26+
else
27+
assert.strictEqual(err.signal, 'SIGTERM');
2228
assert.strictEqual(err.cmd, cmd);
2329
assert.strictEqual(stdout.trim(), '');
2430
assert.strictEqual(stderr.trim(), '');

0 commit comments

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