mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01: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:
parent
40d8983a3d
commit
b23648ef2e
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user