From f7a2ba7e8378d95154832811cd290f62ecdbc01e Mon Sep 17 00:00:00 2001 From: Sungwon <63222221+mete0rfish@users.noreply.github.com> Date: Wed, 13 Aug 2025 17:50:42 +0900 Subject: [PATCH 1/4] test_runner: fix isSkipped check in junit The `isSkipped` function in the JUnit reporter was incorrectly checking for `node?.attrs.failures` instead of `node?.attrs.skipped`. PR-URL: https://github.com/nodejs/node/pull/59414 Reviewed-By: Moshe Atlow Reviewed-By: Pietro Marchini --- lib/internal/test_runner/reporter/junit.js | 2 +- test/parallel/test-runner-reporters.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/internal/test_runner/reporter/junit.js b/lib/internal/test_runner/reporter/junit.js index 0b2efe119fedee..24bbd9ffc3e1cc 100644 --- a/lib/internal/test_runner/reporter/junit.js +++ b/lib/internal/test_runner/reporter/junit.js @@ -58,7 +58,7 @@ function isFailure(node) { } function isSkipped(node) { - return (node?.children && ArrayPrototypeSome(node.children, (c) => c.tag === 'skipped')) || node?.attrs?.failures; + return (node?.children && ArrayPrototypeSome(node.children, (c) => c.tag === 'skipped')) || node?.attrs?.skipped; } module.exports = async function* junitReporter(source) { diff --git a/test/parallel/test-runner-reporters.js b/test/parallel/test-runner-reporters.js index b557cef1b9bef8..50a47578a1da7e 100644 --- a/test/parallel/test-runner-reporters.js +++ b/test/parallel/test-runner-reporters.js @@ -191,4 +191,17 @@ describe('node:test reporters', { concurrency: true }, () => { assert.match(fileConent, /ℹ skipped 0/); assert.match(fileConent, /ℹ todo 0/); }); + + it('should correctly report pass/fail for junit reporter using reporters.js', async () => { + const file = tmpdir.resolve(`${tmpFiles++}.xml`); + const child = spawnSync(process.execPath, + ['--test', '--test-reporter', 'junit', '--test-reporter-destination', file, testFile]); + assert.strictEqual(child.stderr.toString(), ''); + assert.strictEqual(child.stdout.toString(), ''); + const fileContents = fs.readFileSync(file, 'utf8'); + assert.match(fileContents, //); + assert.match(fileContents, /\s*/); + assert.match(fileContents, //); + assert.match(fileContents, //); + }); }); From becb55aac3f7eb93b03223744c35c6194f11e3e9 Mon Sep 17 00:00:00 2001 From: Lee Jiho Date: Wed, 13 Aug 2025 19:25:19 +0900 Subject: [PATCH 2/4] test: fix typos PR-URL: https://github.com/nodejs/node/pull/59330 Reviewed-By: Zeyu "Alex" Yang Reviewed-By: Daeyeon Jeong --- test/parallel/test-abortsignal-cloneable.js | 2 +- test/parallel/test-abortsignal-drop-settled-signals.mjs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-abortsignal-cloneable.js b/test/parallel/test-abortsignal-cloneable.js index ffffcc5f43fa0d..cfd194909db38e 100644 --- a/test/parallel/test-abortsignal-cloneable.js +++ b/test/parallel/test-abortsignal-cloneable.js @@ -35,7 +35,7 @@ test('Can create a transferable abort controller', async () => { mc.port2.postMessage(ac.signal, [ac.signal]); - // Can be cloned/transferd multiple times and they all still work + // Can be cloned/transferred multiple times and they all still work mc.port2.postMessage(ac.signal, [ac.signal]); // Although we're using transfer semantics, the local AbortSignal diff --git a/test/parallel/test-abortsignal-drop-settled-signals.mjs b/test/parallel/test-abortsignal-drop-settled-signals.mjs index b300b0e223fc93..bb7448eacb1c34 100644 --- a/test/parallel/test-abortsignal-drop-settled-signals.mjs +++ b/test/parallel/test-abortsignal-drop-settled-signals.mjs @@ -104,17 +104,17 @@ const limit = 10_000; describe('when there is a long-lived signal', () => { it('drops settled dependant signals', (t, done) => { - makeSubsequentCalls(limit, (signal, depandantSignalsKey) => { + makeSubsequentCalls(limit, (signal, dependantSignalsKey) => { setImmediate(() => { - t.assert.strictEqual(signal[depandantSignalsKey].size, 0); + t.assert.strictEqual(signal[dependantSignalsKey].size, 0); done(); }); }); }); it('keeps all active dependant signals', (t, done) => { - makeSubsequentCalls(limit, (signal, depandantSignalsKey) => { - t.assert.strictEqual(signal[depandantSignalsKey].size, limit); + makeSubsequentCalls(limit, (signal, dependantSignalsKey) => { + t.assert.strictEqual(signal[dependantSignalsKey].size, limit); done(); }, true); From 6e045112969b1f3e1313b235d80582f1f7662693 Mon Sep 17 00:00:00 2001 From: theanarkh Date: Wed, 13 Aug 2025 18:39:53 +0800 Subject: [PATCH 3/4] tools: fix return value of try_check_compiler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/59434 Reviewed-By: Luigi Pinca Reviewed-By: Michaël Zasso Reviewed-By: Marco Ippolito --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index 69841d624f37b0..b6810a2f507c69 100755 --- a/configure.py +++ b/configure.py @@ -1113,7 +1113,7 @@ def try_check_compiler(cc, lang): proc = subprocess.Popen(shlex.split(cc) + ['-E', '-P', '-x', lang, '-'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) except OSError: - return (False, False, '', '') + return (False, False, '', '', False) with proc: proc.stdin.write(b'__clang__ __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ ' From afc5893309ebdd5f5aead8b29406bc033c8d4e65 Mon Sep 17 00:00:00 2001 From: Daniel Osvaldo R Date: Wed, 13 Aug 2025 18:10:21 +0700 Subject: [PATCH 4/4] src: remove duplicate assignment of `O_EXCL` in node_constants.cc PR-URL: https://github.com/nodejs/node/pull/59049 Reviewed-By: theanarkh Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Chengzhong Wu --- src/node_constants.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/node_constants.cc b/src/node_constants.cc index aebda8fb44b919..fd28e0904d05e2 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -1105,10 +1105,6 @@ NODE_DEFINE_CONSTANT(target, UV_FS_O_FILEMAP); NODE_DEFINE_CONSTANT(target, O_DIRECTORY); #endif -#ifdef O_EXCL - NODE_DEFINE_CONSTANT(target, O_EXCL); -#endif - #ifdef O_NOATIME NODE_DEFINE_CONSTANT(target, O_NOATIME); #endif