mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: improve flakiness detection on stack corruption tests
This change skips asserting the exit code of the child process with the corrupted async hooks stack only on those platforms where termination via a signal has been observed. Refs: https://github.com/nodejs/node/pull/58478#discussion_r2132170010 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/58601 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
d2f6c82c0f
commit
9ccdf4fdb4
2 files changed
+10
-4
No files matched your search
@@ -53,9 +53,12 @@ if (process.argv[2] === 'child') {
|
||||
child.stdout.on('data', (d) => { outData = Buffer.concat([ outData, d ]); });
|
||||
|
||||
child.on('close', common.mustCall((code, signal) => {
|
||||
if (signal) {
|
||||
console.log(`Child closed with signal: ${signal}`);
|
||||
if ((common.isAIX ||
|
||||
(common.isLinux && process.arch === 'x64')) &&
|
||||
signal === 'SIGABRT') {
|
||||
// XXX: The child process could be aborted due to unknown reasons. Work around it.
|
||||
} else {
|
||||
assert.strictEqual(signal, null);
|
||||
assert.strictEqual(code, 1);
|
||||
}
|
||||
assert.match(outData.toString(), heartbeatMsg,
|
||||
|
||||
@@ -56,9 +56,12 @@ if (process.argv[2] === 'child') {
|
||||
child.stdout.on('data', (d) => { outData = Buffer.concat([ outData, d ]); });
|
||||
|
||||
child.on('close', common.mustCall((code, signal) => {
|
||||
if (signal) {
|
||||
console.log(`Child closed with signal: ${signal}`);
|
||||
if ((common.isAIX ||
|
||||
(common.isLinux && process.arch === 'x64')) &&
|
||||
signal === 'SIGABRT') {
|
||||
// XXX: The child process could be aborted due to unknown reasons. Work around it.
|
||||
} else {
|
||||
assert.strictEqual(signal, null);
|
||||
assert.strictEqual(code, 1);
|
||||
}
|
||||
assert.match(outData.toString(), heartbeatMsg,
|
||||
|
||||
Reference in new issue
Block a user