From e133cce81d4249316c365bf2fdb1bfc3f879ca42 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Mon, 12 Dec 2016 17:48:04 +0000 Subject: [PATCH] test: Allow all valid AIX rc in test-stdio-closed Fixes: https://github.com/nodejs/node/issues/10234 Allow either of the two possible return codes on AIX to be considered successful on test-stdio-closed.js --- test/parallel/test-stdio-closed.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-stdio-closed.js b/test/parallel/test-stdio-closed.js index a85467f76a6d0f..4bea23b5987f57 100644 --- a/test/parallel/test-stdio-closed.js +++ b/test/parallel/test-stdio-closed.js @@ -32,5 +32,8 @@ const cmd = `"${process.execPath}" "${__filename}" child 1>&- 2>&-`; const proc = spawn('/bin/sh', ['-c', cmd], { stdio: 'inherit' }); proc.on('exit', common.mustCall(function(exitCode) { - assert.strictEqual(exitCode, common.isAix ? 126 : 42); + if (common.isAix) + assert([42, 126].includes(exitCode)); + else + assert.strictEqual(exitCode, 42); }));