test: unflake debugger and REPL tests - #64718
Conversation
There was a problem hiding this comment.
LGTM, but note that the flake won't be entirely resolved until https://chromium-review.googlesource.com/c/v8/v8/+/8123081 lands1
Footnotes
-
Running async, as you've done, makes this far more unlikely, but there's still a chance of it catching itself, if GC occurs at a poor time ↩
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64718 +/- ##
==========================================
- Coverage 90.15% 90.14% -0.01%
==========================================
Files 741 744 +3
Lines 242251 242517 +266
Branches 45624 45686 +62
==========================================
+ Hits 218391 218608 +217
- Misses 15351 15407 +56
+ Partials 8509 8502 -7 🚀 New features to boost your workflow:
|
|
Run the debugger function-formatting checks against an auto-resumed, long-lived target so they do not depend on initial-break rendering. Use a synchronous VM evaluator for the REPL handleError test. Submit the throwing input separately and wait for clean REPL teardown. Signed-off-by: Matteo Collina <hello@matteocollina.com>
58ed4da to
dd871fa
Compare
Use a long-lived debugger target and assert that the prompt is received before sending the exit command. Handle child exit and timeout failures explicitly instead of leaving the test hanging when startup does not produce a prompt. Signed-off-by: Matteo Collina <hello@matteocollina.com>
Example: https://github.com/nodejs/node/actions/runs/30196530330/job/89779074224?pr=64718#step:8:4444 But my V8 fix is about to land, and I'll backport it to this repo |
Commit Queue failed- Loading data for nodejs/node/pull/64718 ✔ Done loading data for nodejs/node/pull/64718 ----------------------------------- PR info ------------------------------------ Title test: unflake debugger and REPL tests (#64718) Author Matteo Collina <matteo.collina@gmail.com> (@mcollina) Branch mcollina:fix-macos-test-flakes -> nodejs:main Labels repl, author ready, needs-ci, debugger Commits 2 - test: unflake debugger and REPL tests - test: harden debugger prompt test Committers 1 - Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/64718 Refs: https://github.com/nodejs/node/actions/runs/30080039199/job/89439279468?pr=64339 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64718 Refs: https://github.com/nodejs/node/actions/runs/30080039199/job/89439279468?pr=64339 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 24 Jul 2026 15:10:29 GMT ✔ Approvals: 2 ✔ - Aviv Keller (@avivkeller): https://github.com/nodejs/node/pull/64718#pullrequestreview-4779560305 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/64718#pullrequestreview-4782846063 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2026-07-29T18:38:33Z: https://ci.nodejs.org/job/node-test-pull-request/75298/ - Querying data for job/node-test-pull-request/75298/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 64718 From https://github.com/nodejs/node * branch refs/pull/64718/merge -> FETCH_HEAD ✔ Fetched commits as 276fe2be450a..9e4ff2c2518a -------------------------------------------------------------------------------- [main 0bc99a5a24] test: unflake debugger and REPL tests Author: Matteo Collina <hello@matteocollina.com> Date: Sat Jul 25 10:01:09 2026 +0200 2 files changed, 27 insertions(+), 11 deletions(-) [main 9f119395f6] test: harden debugger prompt test Author: Matteo Collina <hello@matteocollina.com> Date: Sun Jul 26 10:26:44 2026 +0100 1 file changed, 37 insertions(+), 9 deletions(-) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. (node:347) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated. (Use `node --trace-deprecation ...` to show where the warning was created) Rebasing (2/4) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- test: unflake debugger and REPL testshttps://github.com/nodejs/node/actions/runs/30717992856 |
|
Landed in 219dbd6 |
Run the debugger function-formatting checks against an auto-resumed, long-lived target so they do not depend on initial-break rendering. Use a synchronous VM evaluator for the REPL handleError test. Submit the throwing input separately and wait for clean REPL teardown. Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: #64718 Refs: https://github.com/nodejs/node/actions/runs/30080039199/job/89439279468?pr=64339 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Refs: https://github.com/nodejs/node/actions/runs/30080039199/job/89439279468?pr=64339
The macOS job exposed three independent test races:
test-debugger-extract-function-nameonly checks formatting from theexeccommand, but synchronized on an unrelated initial-break message. Run it
against an auto-resumed, long-lived target and synchronize directly on the
debugger prompt instead.
test-repl-user-error-handlercould receive an inspectorPromise was collectedevaluation error before the user error it intended toassert. Give this focused
handleErrortest a synchronous VM evaluator,submit the throwing and follow-up expressions separately, and await clean
REPL teardown.
test-debug-promptrelied on a nonexistent target and had no assertion,timeout, or child-process lifecycle handling. Use a long-lived debugger
target, assert that the prompt is received, and report startup/exit failures
instead of hanging.
Validation:
python3 tools/test.py test/sequential/test-debug-prompt.jspython3 tools/test.py parallel/test-debugger-extract-function-name parallel/test-repl-user-error-handler