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: https://github.com/nodejs/node/pull/65351
Refs: https://github.com/nodejs/node/pull/65552
Assisted-by: claude:opus-5
Signed-off-by: Junhwan Choi <devjunsday@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65694
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
The tests still fail after being split into multiple files,
(2 out of 30 runs in roughly 48 hours) and the causes are missing
target frames in the samples. This patch moves them to sequential
to observe if the flakiness can be fixed when the tests are
run on a system with less load.
If the flake ever shows up again even after the tests are moved
to sequential, we should consider make the test conditions more
lenient - that is, we would only assert that there are *some* frames
in the generated CPU profile but do not look for the target
function there.
PR-URL: https://github.com/nodejs/node/pull/28210
Refs: https://github.com/nodejs/node/issues/27611
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>