test: slightly refactor test-child-process-execsync
- move
start
time to the point of execution (avoids counting 'throws' tests towards 'timeout' test case) - scope cmd/ret values where possible
- use
filter
instead of manual if/return
Refs: https://github.com/nodejs/node/issues/24921
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines