Repository navigation
Run OpenSSL error-layout tests only on OpenSSL-supported platforms - #137406
Merged
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones |
rzikm
enabled auto-merge (squash)
November 12, 2026 09:35
eiriktsarpalis
approved these changes
Nov 12, 2026
3 tasks
bartonjs
approved these changes
Nov 12, 2026
Member
|
/ba-g test failure is unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace
[Theory]onOpenSslErrorTests.GetSslLibraryReason_UsesLayoutOfLoadedOpenSslwith[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsOpenSslSupported))].This changes only the test's platform eligibility. Production code and all nine input cases remain unchanged.
The issue's CI investigation reports this exact failure in seven of ten sampled builds, plus follow-up build 1661087, affecting both tvOS-arm64 CoreCLR and NativeAOT. This establishes at least eight affected builds, not a 70% failure rate: the remaining sampled builds lacked matching logs and were not confirmed passes. The issue's automated daily and weekly counts also include a different test, so they are not a reliable frequency measure for this failure.
Failure and rationale
The tvOS failure is a native-library initialization failure, not an incorrect decoded error value. The console for build 1659071 reports 136 tests: 124 passed, nine failed, and three ignored. All nine cases of this theory fail with
TypeInitializationExceptionforInterop.OpenSsl, caused byCryptoInitializerfailing to loadlibSystem.Security.Cryptography.Native.OpenSsl.Although
GetSslLibraryReasonperforms managed bit operations, calling it triggers the explicit static constructor onInterop.OpenSsl. That constructor initializes the native OpenSSL library before the helper can execute. The native build deliberately selectsSystem.Security.Cryptography.Native.Applefor Apple platforms instead of the OpenSSL implementation, so the OpenSSL shim is not an expected dependency on tvOS.The existing
PlatformDetection.IsOpenSslSupportedpredicate identifies Linux excluding Android, FreeBSD, illumos, and Solaris. It is false on tvOS and the other Apple platforms. Conditioning the theory on this predicate prevents an unsupported OpenSSL initialization attempt while retaining the complete error-layout coverage on OpenSSL-supported platforms. Both OpenSSL error layouts are supplied explicitly by the existing test data, independently of the installed OpenSSL version.This is not a library-availability check or an exception-based skip: a missing OpenSSL shim on a supported platform will still fail the test. The same conditional-theory predicate is already used by
TlsSessionTests.Validation
git diff --check— passed..\build.cmd clr+libs -rc release— failed on the unchanged baseline with MSVC C1083,Cannot open compiler generated file: '': Invalid argument, while compiling NativeAOT data-descriptor code. This failure preceded the test edit.Before merging, validate the unchanged and patched unit suite on tvOS under both CoreCLR and NativeAOT: the theory should be skipped before OpenSSL initialization, and the remaining applicable tests should continue to run. On Linux, run all nine cases and require them to pass to confirm that supported-platform coverage remains active.
Fixes #136952
Note
This pull request description was generated with GitHub Copilot.