test: fix five recurring CI flakes - #65780
Open
codebytere wants to merge 5 commits into
Open
Conversation
test-child-process-fork-closed-channel-segfault sends a second handle to a worker that exits on the first message and already ignores the errors that race produces (ERR_IPC_CHANNEL_CLOSED, ECONNRESET, ECONNREFUSED, EMFILE). When the worker is gone before the write reaches the IPC pipe, Linux and AIX report the write itself as EPIPE instead, which the callback rethrew. Treat it like the other "worker already exited" errors. Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
test-https-proxy-request-invalid-char-in-url is the only client-proxy test that asserts the proxy logged no socket errors at all. Once the last response has been read the client destroys its tunnel, and if the proxy is still relaying the upstream's TLS close_notify at that point the client answers with a reset, which the proxy records as ECONNRESET on the CONNECT socket. That has been failing the test on macOS even though every request was routed to the sanitized URL. Keep asserting on other errors but leave connection resets out. Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
test-external-memory-reasonable-size makes a child allocate 1.2 GB of external memory so that V8's --external-memory-max-reasonable-size check fires and the process aborts. The abort raises SIGABRT with all of that memory resident, and on hosts that write core files (the SmartOS CI machines in particular) the dump takes longer than the test timeout, so the test has been timing out there since it was added. Run the child under `ulimit -c 0` on POSIX, the same way test-abort-fatal-error and common.childShouldThrowAndAbort() handle their aborting children. Refs: nodejs#65589 Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
test-run-watch-emit-restarted expected exactly one test:watch:restarted
event, but it starts run({ watch: true }) right after writing the
fixtures into the watched directory. Watch backends that deliver events
with some latency, FSEvents on macOS most visibly, can still report
those setup writes once the first run is under way, which restarts it
and makes the later, intentional write the second restart. The test has
been marked flaky on macOS x64 for that reason.
Wait for the first drain, then require that the write is followed by a
restart and a drain, ignoring whatever the setup produced before it, and
drop the flaky marker.
Refs: nodejs#54534
Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
test-wasi-pthread fails now and then on every platform with "Assertion failed: r == 0 (c/pthread.c: main: 17)", i.e. pthread_create() itself reporting an error. The fixture implements `thread-spawn` by starting a Worker and blocking in Atomics.wait(result, 0, 0, 1000) until the worker signals that it has instantiated the module. Two things go wrong there: the worker signals success by storing 0, the value the main thread is already waiting on, so when the worker is quicker than the main thread its notify is lost and the wait runs into the timeout; and one second is not always enough for a Worker to start and instantiate a threads build on the slower CI hosts (arm debug, Windows, macOS). Either way spawn() returns -6 and wasi-libc turns that into a pthread_create() failure. Wait on a sentinel value that neither outcome writes, and give the worker a platform-scaled 30 seconds. Drop the flaky markers. Fixes: nodejs#64226 Refs: nodejs#59146 Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
Collaborator
|
Review requested:
|
Collaborator
panva
approved these changes
Sep 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65780 +/- ##
==========================================
+ Coverage 90.05% 90.07% +0.02%
==========================================
Files 769 769
Lines 261396 261396
Branches 49631 49631
==========================================
+ Hits 235399 235460 +61
+ Misses 17034 16982 -52
+ Partials 8963 8954 -9 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five tests that keep showing up in the nodejs/reliability reports for
mainover the last two weeks, each root-caused and fixed in its own commit. Picked by counting distinctmain-targeting PRs they failed in since 2026-08-21 and dropping everything that has since been fixed onmain(the SEA, recursivefs.watch,Utf8Stream, http2 and dgram link-local ones) or already has a fix in review (#65755, #65767).parallel/test-child-process-fork-closed-channel-segfaultsend()races the worker's exit; Linux/AIX report that asEPIPEon the write, which wasn't in the ignore listclient-proxy/test-https-proxy-request-invalid-char-in-urlECONNRESETparallel/test-external-memory-reasonable-sizeulimit -c 0like the other abort teststest-runner/test-run-watch-emit-restartedwasi/test-wasi-pthreadthread-spawnwaits on the same value the worker stores on success, so an early notify is lost, and gives the worker only 1 s to instantiate; either waypthread_create()fails. Flaky marks droppedLooked at and left alone:
parallel/test-runner-run("should support timeout" reportinguncaughtExceptionon macos15-x64) doesn't reproduce under load on Linux and I couldn't pin it down from the code;sequential/test-debugger-pidandtest-run-watch-cwd-isolation-none*need a Windows/macOS box;pummel/test-fs-watch-non-recursiveon AIX is the host running out of AHAFS watchers.Tests: each changed test passes locally (Linux x64), 16-48 repeats at
-j16for the watch and WASI ones, and the twoparallel/ones also undertools/test.py --worker.Fixes: #64226
Refs: #59146
Refs: #54534
Disclosure: the code and this description were written by Claude Code, directed and reviewed by @codebytere.