Skip to content

test: use spawnSync helpers in cpu-prof tests - #65694

Open
DevJunz wants to merge 1 commit into
nodejs:mainfrom
DevJunz:junhwan/test-cpu-prof-spawn-sync-helpers
Open

DevJunz wants to merge 1 commit into
nodejs:mainfrom
DevJunz:junhwan/test-cpu-prof-spawn-sync-helpers

Conversation

@DevJunz

@DevJunz DevJunz commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Replaces the manual spawnSync() status checks in the eight --cpu-prof tests with spawnSyncAndExitWithoutError() from test/common/child_process, following the same approach as #65552.

These tests logged stderr when the status was non-zero and then asserted the status, so a CI failure never showed stdout, the signal, or the command that ran. The helper reports all of them. Status 0 is still required, and signal null is now checked as well, matching the helper defaults.

Only success-path blocks whose assertions map one-to-one onto the helper defaults are converted.

Refs: #65552

The cpu-prof tests hand-rolled a partial version of what
test/common/child_process already provides: log the child's stderr
when the status is non-zero, then assert the status. That manual
version never shows stdout, the signal, or the command that ran, so
a CI failure gives less information than the helper would.

Replace those blocks with spawnSyncAndExitWithoutError(). Every
existing expectation is preserved -- status 0 is still required, and
signal null is now checked as well, matching the helper defaults.

Only success-path blocks whose assertions map one-to-one onto the
helper defaults are converted.

Refs: nodejs#65351
Refs: nodejs#65552
Assisted-by: claude:opus-5
Signed-off-by: Junhwan Choi <devjunsday@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. labels Sep 1, 2026
@DevJunz
DevJunz marked this pull request as draft September 1, 2026 06:49
@DevJunz
DevJunz marked this pull request as ready for review September 1, 2026 07:12
@codecov

codecov Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.07%. Comparing base (242909f) to head (3a58076).
⚠️ Report is 521 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #65694   +/-   ##
=======================================
  Coverage   90.06%   90.07%           
=======================================
  Files         754      754           
  Lines      256395   256395           
  Branches    48500    48499    -1     
=======================================
+ Hits       230922   230941   +19     
- Misses      16574    16580    +6     
+ Partials     8899     8874   -25     

see 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 1, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 1, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@inoway46 inoway46 added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 25, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 25, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Commit Queue failed

   ✖    - coverage-linux: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180277/job/99764751994)
   ✖    - x86_64-linux: with shared libraries and perfetto / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765096458)
   ✖    - aarch64-darwin: with shared libraries / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765096492)
   ✖    - x86_64-darwin: with shared libraries / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765096527)
   ✖    - aarch64-linux: with shared openssl-fips-3.5.7 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163154)
   ✖    - aarch64-linux: with shared boringssl-0.20260803.0 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163212)
   ✖    - aarch64-linux: with shared openssl-3.0.21 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163226)
   ✖    - aarch64-linux: with shared openssl-3.6.3 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163261)
   ✖    - aarch64-linux: with shared openssl-4.0.1 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163299)
   ✖    - aarch64-linux: with shared openssl-3.5.7 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163304)

The pull request was removed from the Commit Queue and labeled commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. . After resolving the failure, remove that label and add commit-queue PRs queued for automated landing through the Commit Queue. to retry.

Full Commit Queue output
�[36m⠋�[39m Loading data for nodejs/node/pull/65694
�[36m⠋�[39m Loading data for nodejs/node/pull/65694
�[36m⠋�[39m Getting collaborator contacts from README of nodejs/node
�[36m⠋�[39m Getting PR from nodejs/node/pull/65694
�[36m⠋�[39m Getting reviews from nodejs/node/pull/65694
�[36m⠋�[39m Getting comments from nodejs/node/pull/65694
�[36m⠋�[39m Getting commits from nodejs/node/pull/65694
✔  Done loading data for nodejs/node/pull/65694
----------------------------------- PR info ------------------------------------
Title      test: use spawnSync helpers in cpu-prof tests (#65694)
Author     JunHwan <devjunsday@gmail.com> (@DevJunz)
Branch     DevJunz:junhwan/test-cpu-prof-spawn-sync-helpers -> nodejs:main
Labels     test, author ready, needs-ci, commit-queue
Commits    1
 - test: use spawnSync helpers in cpu-prof tests
Committers 1
 - Junhwan Choi <devjunsday@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65694
Refs: https://github.com/nodejs/node/pull/65552
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/65694
Refs: https://github.com/nodejs/node/pull/65552
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Tue, 01 Sep 2026 06:47:58 GMT
   ✔  Approvals: 1
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/65694#pullrequestreview-5082216855
   ✖  15 GitHub CI job(s) cancelled:
   ✖    - test-tarball-linux: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180148/job/99765598070)
   ✖    - test-linux (ubuntu-24.04-arm): CANCELLED (https://github.com/nodejs/node/actions/runs/33479180155/job/99764751539)
   ✖    - test-linux (ubuntu-24.04): CANCELLED (https://github.com/nodejs/node/actions/runs/33479180155/job/99764751879)
   ✖    - test-macOS: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180197/job/99764751903)
   ✖    - coverage-windows: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180247/job/99764752067)
   ✖    - coverage-linux: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180277/job/99764751994)
   ✖    - x86_64-linux: with shared libraries and perfetto / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765096458)
   ✖    - aarch64-darwin: with shared libraries / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765096492)
   ✖    - x86_64-darwin: with shared libraries / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765096527)
   ✖    - aarch64-linux: with shared openssl-fips-3.5.7 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163154)
   ✖    - aarch64-linux: with shared boringssl-0.20260803.0 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163212)
   ✖    - aarch64-linux: with shared openssl-3.0.21 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163226)
   ✖    - aarch64-linux: with shared openssl-3.6.3 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163261)
   ✖    - aarch64-linux: with shared openssl-4.0.1 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163299)
   ✖    - aarch64-linux: with shared openssl-3.5.7 / build: CANCELLED (https://github.com/nodejs/node/actions/runs/33479180524/job/99765163304)
   ℹ  Last Full PR CI on 2026-09-02T22:22:31Z: https://ci.nodejs.org/job/node-test-pull-request/76907/
�[36m⠙�[39m Querying data for job/node-test-pull-request/76907/
�[36m⠙�[39m Querying data for job/node-test-pull-request/76907/
�[36m⠙�[39m Querying API for job/node-test-pull-request/76907/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
�[36m⠹�[39m Querying API for job/node-test-pull-request/76907/
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu

View workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants