child_process: fix parsing messages with splitted length field
Fixes: https://github.com/nodejs/node/issues/55834
Hey! Amazing, nice patch, thank you.
Could you please add a test for it?
@juanarbol I've written a test where the child process sends messages to the main, and the third message is split into parts so that the header with the length of the message is split too, which leads to the problem in the current version but my patch solves it
CI: https://ci.nodejs.org/job/node-test-pull-request/64036/
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.55%. Comparing base (
61e4ad5) to head (73a8e0d). Report is 300 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #56106 +/- ##
==========================================
+ Coverage 88.01% 88.55% +0.53%
==========================================
Files 656 657 +1
Lines 188982 190248 +1266
Branches 35997 36544 +547
==========================================
+ Hits 166330 168468 +2138
+ Misses 15825 14960 -865
+ Partials 6827 6820 -7
| Files with missing lines | Coverage Δ | |
|---|---|---|
| lib/internal/child_process/serialization.js | 95.85% <100.00%> (+0.12%) |
:arrow_up: |
CI: https://ci.nodejs.org/job/node-test-pull-request/64056/
CI: https://ci.nodejs.org/job/node-test-pull-request/64204/
CI: https://ci.nodejs.org/job/node-test-pull-request/64238/
Landed in 009d53ec3c3a411e9ad28eaae419c95b300cb62a