ckerr

#53932: test: avoid exit race in utility process DNS spec

Merged
Created: Sep 14, 2026, 6:32:31 PM
Merged: Sep 14, 2026, 7:47:00 PM
4 comments
Target: main

Description of Change

We found the DNS-result-order spec timing out while testing a downstream Electron fork.

The fixture exits after its stdout write callback runs, but that callback does not guarantee the parent has consumed the data. The utility-process exit handler removes stdout/stderr listeners, so exit arriving before pipe delivery can leave the spec waiting for output. This test checks DNS-option propagation, not stdout behavior.

Use IPC request/reply to obtain dns.getDefaultResultOrder() and assert its exact value. The fixture's message listener keeps it alive until the existing test cleanup terminates it, avoiding the output/exit race without adding a timer or changing runtime behavior.

Backport assessment:

  • 45-x-y, 44-x-y, and 43-x-y contain the same affected test and exit cleanup. IPC support is already present, and the change applies cleanly to all three in a three-way backport check.
  • 42-x-y has the same vulnerable fixture and exit cleanup, but its older callback-based test requires a manual adaptation. It is not targeted under the policy of excluding the oldest active release line from routine, non-security fixes.

Validation:

  • Focused native Linux DNS-option test: 1/1 passed without retries, using the unchanged runtime.
  • Scoped JavaScript lint, formatting, editor diagnostics, and whitespace checks passed.
  • Windows and release-branch runtime tests were not run locally.

CC @mlaurencin

Checklist

Release Notes

Notes: none

Backports

43-x-y
Merged
PR Number
#53933
Merged At
Sep 14, 2026, 8:42:29 PM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#53935
Merged At
Sep 14, 2026, 8:56:26 PM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#53934
Merged At
Sep 14, 2026, 8:44:01 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron