Repository navigation
Conversation
The test runner takes node tests only from test/js/node/test/parallel/, test/js/node/test/sequential/ and test/js/bun/test/parallel/. Two files were in test/js/node/parallel/, so the runner never ran them. From that directory they also could not load '../common'. - Move test-child-process-server-close.js to test/js/node/test/parallel/ and use the text of Node.js v26.3.0. - Delete test-http-socket-encoding-error.js. The v26.3.0 text of the same test is already in test/js/node/test/parallel/. - Add a Windows entry for test-child-process-server-close.js to test/expectations.txt. On Windows, spawn() rejects a named-pipe net.Socket as a stdio entry.
|
Status: ready for review. This PR changes only files under How I reproduced it:
|
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. Warning Review limit reached
This review includes 1 billable file and costs up to $0.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 4 minutes for your next included review. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: oven-sh/bun/.coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: oven-sh/bun/.coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. WalkthroughChangesChild-process server-close regression
HTTP socket encoding test removal
Priority: ⬇️ Low 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
I reviewed this PR and didn't find any bugs. It is a small test-only relocation, but it adds an entry to test/expectations.txt, which is CODEOWNER-gated and removes the whole file from the Windows lanes, so a human look at that entry is still worthwhile.
What was reviewed:
- The re-added
test/js/node/test/parallel/test-child-process-server-close.jscarries blob65a4ebb8in the diff header, matching the upstream v26.3.0 blob the description names; the'use strict', indentation, andmustCallwrappers are the upstream text, not local edits. - The deleted
test/js/node/parallel/test-http-socket-encoding-error.jsis superseded by the existing canonical copy (same body plus'use strict'and a split string), which already has anexpected-durations.jsonentry;test/js/node/parallel/no longer exists after the change. - The Windows expectation's stated cause checks out against
streamFdOf()insrc/js/node/child_process.ts:1752-1758, which returns_handle.fdas-is (so -1 for a named pipe) toBun.spawn; the entry format matches its neighbors, though unlike them it does not cite a CI build number for the Windows verification.
Extended reasoning...
The change touches four files: it deletes two stray node tests under test/js/node/parallel/ (a directory the runner never scanned), re-adds test-child-process-server-close.js at the canonical test/js/node/test/parallel/ path with the upstream Node text, and adds a [ WINDOWS ] quarantine line to test/expectations.txt. No runtime source is modified and no security-sensitive surface is touched. The decision to defer rather than approve rests on test/expectations.txt being owned by a CODEOWNER (.github/CODEOWNERS line 5) and on the header of that file reserving entries for files that cannot run at all, which makes the whole-file Windows quarantine a judgment call for the owner. Independent verification of the upstream blob was not possible in this environment beyond the blob hash shown in the diff header.
…e.js was verified
|
Two points about the
|
There was a problem hiding this comment.
LGTM — a test relocation plus a duplicate cleanup, no runtime code touched.
What was reviewed:
- The new
test/js/node/test/parallel/test-child-process-server-close.jsmatches the upstream Node text ('use strict',common.mustCallon thecreateServer/listencallbacks are upstream, not local edits), so it complies with the no-modification rule for that directory. - The deleted
test/js/node/parallel/test-http-socket-encoding-error.jsdiffers from the surviving copy intest/js/node/test/parallel/only by the'use strict'line and a string-concatenation split — a true duplicate, and the straytest/js/node/parallel/directory is now gone. - The
[ WINDOWS ] ... [ FAIL ]line intest/expectations.txtfollows the same shape as the neighbouringtest-net-pingpong.jsentry; I did not execute the test in this environment, so the POSIX pass relies on CI.
Extended reasoning...
The diff moves one upstream Node.js test from a directory the runner never scans into test/js/node/test/parallel/, deletes a duplicate of a test already present there, and adds a Windows FAIL expectation with a comment explaining the named-pipe stdio gap in spawn(). It touches no src/ code and no security-sensitive surface. The relocated file's text matches upstream Node verbatim and the deleted file is byte-equivalent modulo 'use strict' and a string split, which is what decided approve; the only commit since the earlier review adds a single comment line to expectations.txt.
…de/test/parallel/ (#43723)" The copy under test/js/node/test/parallel/ is not the upstream text: it adds two common.mustCall wrappers.
|
Correction: this change is not part of #49196. Its commit is reverted there ( This PR stays closed. The branch stays. |
Problem
test/js/node/parallel/holds two node tests that CI never runs:test-child-process-server-close.js(Fix test-child-process-server-close #20062) andtest-http-socket-encoding-error.js(Fix http socket encoding check #20031).isNodeTest()(scripts/runner.node.ts:2467) accepts onlyjs/node/test/parallel/,js/node/test/sequential/andjs/bun/test/parallel/.isTestStrict()needs.testorspec.in the file name. The two files match neither.Cannot find module '../common'. The directory istest/js/node/test/common.Fix
test-child-process-server-close.jstotest/js/node/test/parallel/with the text of Node.js v26.3.0 (same git blob,65a4ebb87c). A search oftest/finds no other test that passes anet.Socketas a stdio entry of a child.test-http-socket-encoding-error.js. node:http/https/http2: raise Node v26.3.0 compat to ~94%, sync the upstream suites, and fix the Windows/macOS transport-layer teardown bugs they exposed #32488 already put the v26.3.0 text of this test intest/js/node/test/parallel/.[ WINDOWS ]entry totest/expectations.txt. On Windows the handle of a named pipe has no fd, andspawn()throwsERR_INVALID_ARG_TYPE: file descriptor must be a positive integer. Node v26.3.0 passes there.Background
test/js/node/test/are copies of Node.js tests. The runner starts each withbun run. Exit code 0 is a pass.common.PIPE(a unix socket on POSIX, a named pipe on Windows). It spawnsbun -vwith that connection as the stdout of the child. The client must receive the version text.test/expectations.txtremoves a file from the run on the platforms that its modifier names.Notes
No
src/change. The test passes on main once it is in the right directory.Runs on Linux x64, each through
scripts/runner.node.ts(so withBUN_TEST_DRAIN_EVENT_LOOP=1, the exception-check validation and LeakSanitizer on the debug build):The test is not empty on POSIX. A copy that logs the chunk prints
client got: "1.4.3\n".The two files in place, on main:
The deleted copy of
test-http-socket-encoding-error.jsdiffers from the copy that stays only by the missing'use strict'line and one string concatenation.Windows x64, 1.4.3-canary.1+9cba9036a, the v26.3.0 text:
A probe on the same machine (a server on
\\.\pipe\...,spawn(process.execPath, ['-v'], { stdio: ['ignore', conn, 'ignore'] })):conn._handle.fdv26.3.0\r\n, child closes with 0spawn()throwsERR_INVALID_ARG_TYPEstreamFdOf()insrc/js/node/child_process.tsreads_handle.fdand gives it toBun.spawn. Node does not need an fd here: libuv takes theuv_pipe_tof a connected named pipe asUV_INHERIT_STREAM. Support for this inBun.spawnon Windows is separate work. I found no issue or open PR for it. Remove the[ WINDOWS ]entry when that support exists.The Windows runner with and without the entry:
Not checked on macOS. It uses the same POSIX path as Linux (
common.PIPEis a unix socket and_handle.fdis a real descriptor).Two open PRs, #34659 and #41400, also add
test/js/node/test/parallel/test-child-process-server-close.js. Both carry the same v26.3.0 blob, so this change does not give them a conflict in that file. Neither removestest/js/node/parallel/.A scan of
test/for othertest-*.jsfiles outside the directories that the runner accepts finds only fixtures and helper modules.no test proof · iteration 0 · no src or test change; test-proof not applicable