Skip to content

test_runner: filter execArgv fallback for child tests#64056

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-runner-flag-propagation
Open

test_runner: filter execArgv fallback for child tests#64056
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-runner-flag-propagation

Conversation

@trivikr

@trivikr trivikr commented Jun 22, 2026

Copy link
Copy Markdown
Member

Fixes flaky failures in parallel/test-runner-flag-propagation.

Apply the test runner propagation filter to process.execArgv entries that
are not reported by the options binding.

Some flags, such as config-file/test-runner flags, can reach the isolated
child test fallback path through process.execArgv. Without filtering that
path, flags like --experimental-config-file may leak into child tests and
re-enable options that should not propagate, including
--experimental-test-coverage.

This change keeps preserving V8-only flags such as --allow-natives-syntax,
while filtering test-runner control flags consistently across both
option-binding flags and fallback execArgv entries.

Refs: https://github.com/nodejs/reliability/issues?q=sort%3Aupdated-desc%20is%3Aissue%20state%3Aopen%20%22test-runner-flag-propagation%22

Example
not ok 3946 parallel/test-runner-flag-propagation
  ---
  duration_ms: 6171.58100
  severity: fail
  exitcode: 1
  stack: |-
    Test failure: 'should propagate --experimental-test-coverage from config file (test) to child tests'
    Location: test/parallel/test-runner-flag-propagation.js:94:7
    AssertionError [ERR_ASSERTION]: Config file propagation test failed for --experimental-test-coverage.
    
    1 !== 0
    
        at TestContext.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux-containered/test/parallel/test-runner-flag-propagation.js:126:16)
        at Test.runInAsyncScope (node:async_hooks:226:14)
        at Test.run (node:internal/test_runner/test:1382:25)
        at Suite.processPendingSubtests (node:internal/test_runner/test:960:18)
        at Test.postRun (node:internal/test_runner/test:1522:19)
        at Test.run (node:internal/test_runner/test:1447:12)
        at async Suite.processPendingSubtests (node:internal/test_runner/test:960:7) {
      generatedMessage: false,
      code: 'ERR_ASSERTION',
      actual: 1,
      expected: 0,
      operator: 'strictEqual',
      diff: 'simple'
    }

Assisted-by: openai:gpt-5.5

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Jun 22, 2026
@trivikr trivikr added flaky-test Issues and PRs related to the tests with unstable failures on the CI. request-ci Add this label to start a Jenkins CI on a PR. labels Jun 22, 2026
@trivikr trivikr force-pushed the test-runner-flag-propagation branch from 72be9b2 to cf6afe3 Compare June 22, 2026 06:36
@trivikr trivikr changed the title test_runner: filter execArgv fallback for child tests test: filter test_runner execArgv fallback for child tests Jun 22, 2026
@trivikr trivikr force-pushed the test-runner-flag-propagation branch from cf6afe3 to 4735216 Compare June 22, 2026 06:38
@trivikr trivikr changed the title test: filter test_runner execArgv fallback for child tests test_runner: filter execArgv fallback for child tests Jun 22, 2026
@trivikr trivikr added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 22, 2026
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
@trivikr trivikr force-pushed the test-runner-flag-propagation branch from 4735216 to 456353e Compare June 22, 2026 06:44
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 22, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. flaky-test Issues and PRs related to the tests with unstable failures on the CI. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants