From 83b91ea6ec00c73ab35731a673133736cac472e7 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Mon, 29 Jun 2026 00:04:46 -0700 Subject: [PATCH] test_runner: filter execArgv fallback for child tests Apply the test runner propagation filter to execArgv entries that are not reported by the options binding. This prevents config-file and test-runner flags from leaking into isolated child tests while still preserving V8 flags. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5 PR-URL: https://github.com/nodejs/node/pull/64056 Refs: https://github.com/nodejs/reliability/issues?q=%22test-runner-flag-propagation%22 Reviewed-By: Filip Skokan --- lib/internal/test_runner/runner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/test_runner/runner.js b/lib/internal/test_runner/runner.js index f9442be8ed1..a4441ea31a9 100644 --- a/lib/internal/test_runner/runner.js +++ b/lib/internal/test_runner/runner.js @@ -208,7 +208,7 @@ function getRunArgs(path, { forceExit, const nodeOptionsSet = new SafeSet(processNodeOptions); const unknownProcessExecArgv = ArrayPrototypeFilter( process.execArgv, - (arg) => !nodeOptionsSet.has(arg), + (arg, i, arr) => !nodeOptionsSet.has(arg) && filterExecArgv(arg, i, arr), ); ArrayPrototypePushApply(runArgs, unknownProcessExecArgv);