Skip to content

[rel/4.5] Stabilize IPC disconnect test EOF rendezvous - #12289

Merged
Amaury Levé (Evangelink) merged 1 commit into
rel/4.5from
evangelink-rel-4-5-ipc-test-rendezvous
Nov 9, 2026
Merged

Amaury Levé (Evangelink) merged 1 commit into
rel/4.5from
evangelink-rel-4-5-ipc-test-rendezvous

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Backport only the five-line IPC-test slice of #12252. After disposing the idle client, observe and assert server-side transport EOF while the reply callback remains gated, then release the response. The exact request, closure diagnostic and server-loop completion assertions, per-test resources, and finally cleanup are unchanged.

Relates to #12287, without closing it. This is one independent, squashable commit targeting rel/4.5: one file, five additions, no deletions. No controller-host fixture, Retry, production, API, package, target, CI or scheduler changes.

Provenance

  • Upstream: 19c516fe2735245f71141e16dc0456c9257269bd (Stabilize MTP disconnect and controller-host tests #12252).
  • Plain cherry-pick source: 826ef0f11a51e59861ceeb6e994917587add82d5 (original parent 601527fac8ea3e03811f0a433093b7a10099e3ce); existing message and coauthor preserved.
  • New commit: f94ac669396629b6736fe92e7031c5e47c03adc6, sole parent a39964ce2cf09c4abcbaa7bb8f4e5818638a9de3 (rel/4.5).
  • Verified tree: 6e0a6ec01057dcf25d2b78efcfbc84c6bb8fd16a. Source UTF-8 BOM preserved.

Fresh validation on this release base

Host Baseline Corrected
Windows net8.0 (.NET 8.0.33) 16/16 passed 16/16 passed
Windows net9.0 (.NET 9.0.22) 16/16 passed 16/16 passed
Windows net462 16/16 passed 16/16 passed
Ubuntu 24.04 WSL net8.0 (.NET 8.0.30) 16/16 passed 16/16 passed
Ubuntu 24.04 WSL net9.0 (.NET 9.0.12) 16/16 passed 16/16 passed

Both targeted repo-script builds passed with zero warnings/errors and distinct binlogs, using the pinned 12.0.100-alpha.1.26480.103 SDK in this checkout's private .dotnet. All 30 TRX/JUnit/CTRF reports were parsed: 80 baseline and 80 corrected cases passed, none failed/skipped. SingleConnectionNamedPipeServer_ClientDisconnectsBeforeReply_LogsConciseClosure executed and passed exactly once in every run; all retained 32 workers, MethodLevel. WSL ran the same freshly Windows-built portable IL on the installed Linux runtimes, not a separate Linux build.

This is a test-arrangement stability change, not a reproduced product regression. The original intermittent timeout was not reproduced, and fault injection was not rerun on this release base. Earlier validation described in the inherited commit message is not counted in these fresh results. No repack or acceptance run was needed for this test-only slice.

Standalone validation commands and results

The following reproduces the executed build/host arguments from the checkout root, with checkout-relative host paths and unique binlog paths. Baseline ran at a39964ce2cf09c4abcbaa7bb8f4e5818638a9de3; corrected ran after rebuilding f94ac669396629b6736fe92e7031c5e47c03adc6. Each phase used its own matching binaries.

$project = 'test\UnitTests\Microsoft.Testing.Platform.UnitTests\Microsoft.Testing.Platform.UnitTests.csproj'
$binlog = Join-Path $PWD ("artifacts\log\Debug\ipc-baseline-$([guid]::NewGuid()).binlog")
.\eng\build.ps1 -restore -build -projects $project -msbuildEngine dotnet "/bl:$binlog"
# Baseline: passed, 0 warnings, 0 errors.

$binlog = Join-Path $PWD ("artifacts\log\Debug\ipc-corrected-$([guid]::NewGuid()).binlog")
.\eng\build.ps1 -build -projects $project -msbuildEngine dotnet "/bl:$binlog"
# Corrected: passed, 0 warnings, 0 errors.

Windows host commands, run separately for each phase after building the matching commit:

$phase = 'corrected' # 'baseline' for the release-base run.
foreach ($tfm in 'net8.0', 'net9.0', 'net462') {
    $name = "$phase-windows-$tfm"
    $out = Join-Path $PWD "artifacts\ipc-validation\$name"
    $testArgs = @(
        '--filter', 'FullyQualifiedName~Microsoft.Testing.Platform.UnitTests.IPCTests.',
        '--results-directory', $out,
        '--report-trx', '--report-trx-filename', "$name.trx",
        '--report-junit', '--report-junit-filename', "$name.xml",
        '--report-ctrf', '--report-ctrf-filename', "$name.ctrf.json",
        '--diagnostic', '--diagnostic-output-directory', $out,
        '--diagnostic-file-prefix', $name, '--diagnostic-verbosity', 'trace',
        '--timeout', '5m', '--no-progress', '--no-ansi', '--show-test-results', 'failed'
    )
    $hostPath = "artifacts\bin\Microsoft.Testing.Platform.UnitTests\Debug\$tfm\Microsoft.Testing.Platform.UnitTests"
    if ($tfm -eq 'net462') { & "$hostPath.exe" @testArgs }
    else { & .\.dotnet\dotnet.exe "$hostPath.dll" @testArgs }
    if ($LASTEXITCODE -ne 0) { throw "$name failed: $LASTEXITCODE" }
}
# Both phases: exit 0 and 16/16 passed for each TFM.

Inside the existing Ubuntu WSL distribution, from the mounted checkout root:

set -e
phase=corrected # baseline for the release-base run.
for tfm in net8.0 net9.0; do
  name="$phase-ubuntu-$tfm"
  out="$PWD/artifacts/ipc-validation/$name"
  dotnet "artifacts/bin/Microsoft.Testing.Platform.UnitTests/Debug/$tfm/Microsoft.Testing.Platform.UnitTests.dll" \
    --filter 'FullyQualifiedName~Microsoft.Testing.Platform.UnitTests.IPCTests.' \
    --results-directory "$out" \
    --report-trx --report-trx-filename "$name.trx" \
    --report-junit --report-junit-filename "$name.xml" \
    --report-ctrf --report-ctrf-filename "$name.ctrf.json" \
    --diagnostic --diagnostic-output-directory "$out" \
    --diagnostic-file-prefix "$name" --diagnostic-verbosity trace \
    --timeout 5m --no-progress --no-ansi --show-test-results failed
done
# Both phases: exit 0 and 16/16 passed for each TFM.

The first no-restore build attempt reported the missing Arcade toolset; the successful baseline command above restored it and the required local toolchain.

Port only the IPC test portion of #12252 (upstream 19c516f). Observe server-side transport EOF while the reply is gated; retain exact request, closure diagnostic and server-loop completion assertions. No production, controller-host fixture, CI, API, package or scheduling changes.

The full IPC class passes 48 Windows executions across net8/net9/net462 and 32 Ubuntu executions across net8/net9, plus 20 Ubuntu repetitions. Byte-identical repaired tests reject an intentionally wrong closure diagnostic on both platforms and pass after production restoration. This is retained fault sensitivity, not reproduction of the original intermittent timeout.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Evangelink
Amaury Levé (Evangelink) merged commit 63cf462 into rel/4.5 Nov 9, 2026
22 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the evangelink-rel-4-5-ipc-test-rendezvous branch November 9, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant