Port System.Net.Http to OpenBSD#129475
Conversation
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
|
cc @sethjackson no test failure: /home/am11/th/artifacts/bin/testhost/net11.0-openbsd-Debug-x64/dotnet exec --runtimeconfig System.Net.Http.Unit.Tests.runtimeconfig.json --depsfile System.Net.Http.Unit.Tests.deps.json xunit.console.dll System.Net.Http.Unit.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
popd
===========================================================================================================
~/system.nethttp ~/system.nethttp
Discovering: System.Net.Http.Unit.Tests (method display = ClassAndMethod, method display options = None)
Discovered: System.Net.Http.Unit.Tests (found 964 test cases)
Starting: System.Net.Http.Unit.Tests (parallel test collections = on [5 threads], stop on fail = off)
System.Net.Http.Tests.CacheControlHeaderValueTest.ToString_NegativeValues_UsesMinusSignRegardlessOfCurrentCulture [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.ParseInt32EnvironmentVariableValue_WhenNotSet_DefaultIsUsed [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.QueryRuntimeSettingInt32_InvalidValue_FallbackToDefault [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.QueryRuntimeSettingSwitch_AppContextHasPriority [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.ParseDoubleEnvironmentVariableValue_ValidValue [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.ParseInt32EnvironmentVariableValue_InvalidValue_FallbackToDefault [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.QueryRuntimeSettingInt32_EnvironmentVariable [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.QueryRuntimeSettingSwitch_InvalidValue_FallbackToDefault [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.QueryRuntimeSettingInt32_AppContextHasPriority [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.ParseDoubleEnvironmentVariableValue_InvalidValue_FallbackToDefault [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.QueryRuntimeSettingSwitch_EnvironmentVariable [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.QueryRuntimeSettingSwitch_WhenNotSet_DefaultIsUsed [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.ParseInt32EnvironmentVariableValue_ValidValue [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.QueryRuntimeSettingInt32_WhenNotSet_DefaultIsUsed [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.RuntimeSettingParserTest.ParseDoubleEnvironmentVariableValue_WhenNotSet_DefaultIsUsed [SKIP]
Condition(s) not met: "SupportsRemoteExecutor (TargetInvocationException)"
System.Net.Http.Tests.DiagnosticsHelperTest.GetRedactedUriString_DisableUriRedaction_DoesNotRedactUri [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.SystemProxyInfoTest.Ctor_ProxyEnvironmentVariableSet_IsHttpEnvironmentProxy [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.SystemProxyInfoTest.Ctor_NoEnvironmentVariables_NotHttpEnvironmentProxy [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpEnvironmentProxyTest.HttpProxy_CredentialParsing_DefaultCredentials [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpEnvironmentProxyTest.HttpProxy_TryCreateAndPossibleCgi_HttpProxyUpperCaseDisabledInCgi [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpEnvironmentProxyTest.HttpProxy_TryCreate_CaseInsensitiveVariables [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpEnvironmentProxyTest.HttpProxy_Uri_Parsing [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpEnvironmentProxyTest.HttpProxy_EnvironmentProxy_Loaded [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpEnvironmentProxyTest.HttpProxy_CredentialParsing_Basic [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpEnvironmentProxyTest.HttpProxy_Exceptions_Match [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HeaderEncodingTest.GetHeaderValue_RoundTrips_ReplacesDangerousCharacters(input: "😃", encodingName: null) [SKIP]
The test case is invalid for the default encoding.
System.Net.Http.Tests.HeaderEncodingTest.GetHeaderValue_RoundTrips_ReplacesDangerousCharacters(input: "\xffff", encodingName: null) [SKIP]
The test case is invalid for the default encoding.
System.Net.Http.Tests.HeaderEncodingTest.GetHeaderValue_RoundTrips_ReplacesDangerousCharacters(input: "�", encodingName: null) [SKIP]
The test case is invalid for the default encoding.
System.Net.Http.Tests.HeaderEncodingTest.GetHeaderValue_RoundTrips_ReplacesDangerousCharacters(input: "🙈🙉🙊", encodingName: null) [SKIP]
The test case is invalid for the default encoding.
System.Net.Http.Tests.HttpWindowsProxyTest.HttpProxy_Multi_ConcurrentUse_Success [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpWindowsProxyTest.HttpProxy_Local_Parsing [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpWindowsProxyTest.HttpProxy_WindowsProxy_Loaded [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpWindowsProxyTest.GetProxy_ManualSettingsOnly_ManualSettingsUsed [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpWindowsProxyTest.HttpProxy_WindowsProxy_Manual_Loaded [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpWindowsProxyTest.HttpProxy_Multi_Success [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpWindowsProxyTest.IsBypassed_ReturnsFalse [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpWindowsProxyTest.GetProxy_BothAutoDetectAndManualSettingsButFailedAutoDetect_ManualSettingsUsed [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpWindowsProxyTest.HttpProxy_WindowsProxy_PAC_Loaded [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
System.Net.Http.Tests.HttpWindowsProxyTest.HttpProxy_Local_Bypassed [SKIP]
Condition(s) not met: "IsSupported (TargetInvocationException)"
Finished: System.Net.Http.Unit.Tests
=== TEST EXECUTION SUMMARY ===
System.Net.Http.Unit.Tests Total: 2589, Errors: 0, Failed: 0, Skipped: 39, Time: 32.408s
~/system.nethttp |
|
Nice! Did you not need the target fx change in System.Net.Security in conjunction so the managed TLS stuff works? Eg the csproj change in #129379? The native SSL library lookup here is much better than what I hacked up previously. 😅 |
|
@sethjackson, ops I haven't seen that PR. OpenSSL is what .NET officially support and LibreSSL at some point used to work few years ago. But these days, it doesn't work as it is missing some required symbols like This PR is adding lookup probe fro I suggest we close the other PR as this one is fixing it based on succeeding unit tests. |
|
Oh no worries at all! This one is better anyways. :) Yeah understood on OpenSSL. I think that |
|
Opened #129479 for System.Net.Security. Note that I have these installed: $ pkg_info | grep heimdal
heimdal-7.8.0 Kerberos 5 implementation
heimdal-libs-7.8.0 Heimdal libraries and headers |
|
Awesome! Yeah I installed |
|
Oh BTW did you have to set |
I had to set it initially, but then I added a probe which looks for |
|
I just pushed versioning.targets change in these PRs, so order of merge is independent while the CI is happy. |
Oh right. I skimmed the shim changes and failed to realize it looks in the |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-linux;$(NetCoreAppCurrent)-osx;$(NetCoreAppCurrent)-freebsd;$(NetCoreAppCurrent)-maccatalyst;$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)-wasi;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-solaris;$(NetCoreAppCurrent)-haiku;$(NetCoreAppCurrent)-android;$(NetCoreAppCurrent)</TargetFrameworks> | ||
| <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-linux;$(NetCoreAppCurrent)-osx;$(NetCoreAppCurrent)-freebsd;$(NetCoreAppCurrent)-openbsd;$(NetCoreAppCurrent)-maccatalyst;$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)-wasi;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-solaris;$(NetCoreAppCurrent)-haiku;$(NetCoreAppCurrent)-android;$(NetCoreAppCurrent)</TargetFrameworks> |
There was a problem hiding this comment.
Are the linux/freebsd/openbsd/solaris/haiku builds any different from one another?
For cryptography we build "unix", and then special variants for macOS-nee-OSX and friends.
There was a problem hiding this comment.
There are some "platform specific" blocks:
$ git grep -niE 'linux|haiku|solaris|osx|apple|illumos|bsd' -- ':/src/libraries/System.Net.Http/src/*cs'
src/libraries/System.Net.Http/src/System/Net/Http/GlobalHttpSettings.cs:44: [SupportedOSPlatformGuard("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/GlobalHttpSettings.cs:51: (OperatingSystem.IsLinux() && !OperatingSystem.IsAndroid()) || OperatingSystem.IsWindows() || OperatingSystem.IsMacOS());
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs:112: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs:152: // Resolving a non-existent hostname often leads to EAI_AGAIN/TryAgain on Linux, indicating a non-authoritative failure, eg. timeout.
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs:153: // Getting EAGAIN/TryAgain from a TCP connect() is not possible on Windows or Mac according to the docs and indicates lack of kernel resources on Linux,
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:61: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:129: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:204: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:243: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:326: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:357: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:479: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:522: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:558: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs:759:#if !ILLUMOS && !SOLARIS && !HAIKU
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.cs:278: // It breaks TLS resume on Linux
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs:18: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs:20: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs:47:#if !ILLUMOS && !SOLARIS && !HAIKU
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs:142:#if !ILLUMOS && !SOLARIS && !HAIKU
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs:460:#if !ILLUMOS && !SOLARIS && !HAIKU
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs:153: [SupportedOSPlatform("linux")]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs:8: // On OSX we get default proxy configuration from either environment variables or the OSX system proxy.
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs:8: // On Unix (except for OSX) we get default proxy configuration from environment variables. If the|
Tests continue to pass with fixed package probing (and dynamic SONAME) strategy. :) |
Contributes to #124911.