Repository navigation
test(relinker): isolate Windows diagnostic fixtures - #2154
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
|
I reviewed the full diff and the reported Windows relinker-only build/CTest results. The change is distinct from #2117: that PR adds the CLI help process test, while this adds Windows fixture-isolation coverage. Both insert separate This head is based on |
9d14b07 to
12ef4bd
Compare
12ef4bd to
a58fe0c
Compare
test(relinker): isolate Windows diagnostic fixtures
What
windows_dependency_diagnosticsreuses the same fixture directory and rewritesdiagnostic-runner.exeon each invocation. An unchanged-main control passed 17 times before failing withCannot write diagnostic fixture. Instrumentation identified the runner's truncating open as the failing operation: CRT errno 22, native error 1224 (ERROR_USER_MAPPED_FILE). The process holding the intermittent mapping has not been identified.Exclusively create a separate fixture directory for each invocation, remove it on success, and retain it on failure for diagnosis. Check opening, writing and closing explicitly; failures name the path, operation, requested byte count and error values. Existing generated images, dependency scenarios and assertions remain unchanged. No write retries, sleeps or production behavior changes are added.
Register a Windows-only integration regression that holds a previous fixture in a read-only data mapping, runs the actual diagnostic executable once and then twice concurrently, and checks that the previous file and directory remain untouched and successful runs clean up their own files. This deterministically exercises the mapped-file truncation restriction; it does not identify the owner or type of the mapping in the natural failure.
Related: #1913, where the independently reproduced write failure was recorded. This PR is separate from TLS test scheduling and does not claim to fix the TLS timeout.
The Windows-only Python regression registration is at the end of the Python-enabled test block. This leaves the insertion point used by the independent CLI help PR #2117 free. Neither PR depends on the other.
Tested
Latest publication head
a58fe0cd72a44bc472d01e5681c66f2a665caeab, rebased onto upstreammain4c3674192964a3b316d694161593a593012ea537. Windows x64 (10.0.26300.0), WinLibs MinGW-w64 GCC 15.2.0 UCRT/POSIX/SEH, Python 3.12.14; Release,ANYPS5_RELINKER_ONLY=ON,BUILD_TESTING=ON.--parallel 4 --timeout 120: 41/41 passed, zero skipped, 39.19 seconds total. Both diagnostic tests passed ten repetitions each with--parallel 2(20/20 runs, 20.37 seconds total). The new isolation regression took 2.77 seconds in the full suite and at most 2.48 seconds in those focused repeats. Its registered 30-second timeout is unchanged; no repository timeout was increased. The unchanged TLS coverage test took 39.18 seconds in the full run; its scheduling is the separate work in test(relinker): split TLS coverage into bounded CTest groups #1913.d70b89989473ba1f6ae13e44e079e67f1f8a44b0, with feat(relinker): support explicit CLI help #2117 head0cdc998863ba79f763ec9bf1344c9e346d1a2f94: both merge orders are automatic and produce the same tree. An actual temporary merge was configured and built separately;cli_helpandwindows_diagnostic_fixture_isolationare each registered exactly once. Full combined CTest passed 42/42, zero skipped, 23.79 seconds total. CLI help plus both diagnostic tests passed ten repetitions each (30/30 runs). The combined snapshot was saved locally and the candidate was restored cleanly; this PR contains only the three fixture-isolation files.git range-diffreports equivalent patches before and after the rebase (12ef4bdfanda58fe0cd); the C++ fixture handling, Python regression and CMake addition are unchanged. The test-registration relocation for feat(relinker): support explicit CLI help #2117 was part of the previous publication update; the integration results above are earlier measurements, not a new integration run.6a2b99b8, Python 3.10.6: unchanged test failed on run 18 after 17 passes; instrumented unchanged fixture handling failed on run 23 with native error 1224. The isolation candidate passed 100/100 consecutive runs. The mapped-fixture regression fails against the original binary and passes with the fix. These are the earlier controls; the process holding the natural mapping remains unidentified.TIMEOUT 30. Committed-head conventions (including this PR description), test registration andgit diff origin/main...HEAD --checkpassed.Checklist
mainat the exact revision recorded above; no other open PR implements this fixture isolation fix.mdfiles or images added to the repository