diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs index dfbf9ee89beea0..aeae11532594f3 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs @@ -21,7 +21,7 @@ namespace System.Net.Http.Functional.Tests { - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class HttpClientHandlerTest_Http3 : HttpClientHandlerTestBase { protected override Version UseVersion => HttpVersion.Version30; diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs index 220e6706fcf168..662fd3479ce1a3 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs @@ -30,13 +30,14 @@ protected static async Task DefaultConnectCallback(EndPoint endPoint, Ca protected static bool IsWinHttpHandler => false; - public static bool IsQuicSupported + public static bool IsHttp3Supported { get { try { - return QuicConnection.IsSupported; + return QuicConnection.IsSupported + && (bool)Type.GetType("System.Net.Http.GlobalHttpSettings+SocketsHttpHandler, System.Net.Http").GetProperty("AllowHttp3").GetValue(null); } catch (System.PlatformNotSupportedException) { diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientMiniStressTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientMiniStressTest.cs index a0844444705d71..b739faf0dd72d8 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientMiniStressTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientMiniStressTest.cs @@ -31,7 +31,7 @@ public void CreateAndDestroyManyClients(int numClients) } } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_HttpClientMiniStress_Http3 : HttpClientMiniStress { public SocketsHttpHandler_HttpClientMiniStress_Http3(ITestOutputHelper output) : base(output) { } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs index c1cbd3540a823d..53159e0a824917 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs @@ -1346,7 +1346,7 @@ public HttpMetricsTest_Http20_HttpMessageInvoker(ITestOutputHelper output) : bas } } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public class HttpMetricsTest_Http30 : HttpMetricsTest { protected override Version UseVersion => HttpVersion.Version30; diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/ResponseStreamZeroByteReadTests.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/ResponseStreamZeroByteReadTests.cs index 8fe520464e5784..1f6ad745e82e04 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/ResponseStreamZeroByteReadTests.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/ResponseStreamZeroByteReadTests.cs @@ -181,7 +181,7 @@ public Http2ResponseStreamZeroByteReadTest(ITestOutputHelper output) : base(outp protected override Version UseVersion => HttpVersion.Version20; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class Http3ResponseStreamZeroByteReadTest : ResponseStreamZeroByteReadTestBase { public Http3ResponseStreamZeroByteReadTest(ITestOutputHelper output) : base(output) { } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index 2577094cb52b4e..7a50f81323c9b4 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -124,7 +124,7 @@ public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http2(ITestOutputHel protected override Version UseVersion => HttpVersion.Version20; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http3 : SocketsHttpHandler_HttpClientHandler_Asynchrony_Test { public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test_Http3(ITestOutputHelper output) : base(output) { } @@ -331,7 +331,7 @@ public SocketsHttpHandler_DiagnosticsTest_Http2(ITestOutputHelper output) : base protected override Version UseVersion => HttpVersion.Version20; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_DiagnosticsTest_Http3 : DiagnosticsTest { public SocketsHttpHandler_DiagnosticsTest_Http3(ITestOutputHelper output) : base(output) { } @@ -1248,7 +1248,7 @@ public async Task Http2GetAsync_TrailerHeaders_TrailingPseudoHeadersThrow() } } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_Http3_TrailingHeaders_Test : SocketsHttpHandler_TrailingHeaders_Test { public SocketsHttpHandler_Http3_TrailingHeaders_Test(ITestOutputHelper output) : base(output) { } @@ -1815,7 +1815,7 @@ public SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http2(ITest protected override Version UseVersion => HttpVersion.Version20; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http3 : SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength { public SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http3(ITestOutputHelper output) : base(output) { } @@ -4197,42 +4197,42 @@ public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http2(ITestOutputH protected override Version UseVersion => HttpVersion.Version20; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Http3 : HttpClientHandlerTest { public SocketsHttpHandlerTest_HttpClientHandlerTest_Http3(ITestOutputHelper output) : base(output) { } protected override Version UseVersion => HttpVersion.Version30; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandlerTest_Cookies_Http3 : HttpClientHandlerTest_Cookies { public SocketsHttpHandlerTest_Cookies_Http3(ITestOutputHelper output) : base(output) { } protected override Version UseVersion => HttpVersion.Version30; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3 : HttpClientHandlerTest_Headers { public SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3(ITestOutputHelper output) : base(output) { } protected override Version UseVersion => HttpVersion.Version30; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3 : SocketsHttpHandler_Cancellation_Test { public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3(ITestOutputHelper output) : base(output) { } protected override Version UseVersion => HttpVersion.Version30; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3 : HttpClientHandler_AltSvc_Test { public SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3(ITestOutputHelper output) : base(output) { } protected override Version UseVersion => HttpVersion.Version30; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_HttpClientHandler_Finalization_Http3 : HttpClientHandler_Finalization_Test { public SocketsHttpHandler_HttpClientHandler_Finalization_Http3(ITestOutputHelper output) : base(output) { } @@ -4389,7 +4389,7 @@ public SocketsHttpHandler_RequestContentLengthMismatchTest_Http2(ITestOutputHelp protected override Version UseVersion => HttpVersion.Version20; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_RequestContentLengthMismatchTest_Http3 : SocketsHttpHandler_RequestContentLengthMismatchTest { public SocketsHttpHandler_RequestContentLengthMismatchTest_Http3(ITestOutputHelper output) : base(output) { } @@ -4573,7 +4573,7 @@ public SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http2(ITestOutputHelpe protected override Version UseVersion => HttpVersion.Version20; } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http3 : SocketsHttpHandler_SecurityTest, IClassFixture { public SocketsHttpHandler_SocketsHttpHandler_SecurityTest_Http3(ITestOutputHelper output, CertificateSetup certificateSetup) : base(output, certificateSetup) { } @@ -4701,7 +4701,7 @@ await Http11LoopbackServerFactory.Singleton.CreateClientAndServerAsync(async uri } } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class SocketsHttpHandler_HttpRequestErrorTest_Http30 : SocketsHttpHandler_HttpRequestErrorTest { public SocketsHttpHandler_HttpRequestErrorTest_Http30(ITestOutputHelper output) : base(output) { } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/TelemetryTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/TelemetryTest.cs index 27c29456346db2..85587cac87156e 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/TelemetryTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/TelemetryTest.cs @@ -1175,7 +1175,7 @@ public sealed class TelemetryTest_Http20 : TelemetryTest public TelemetryTest_Http20(ITestOutputHelper output) : base(output) { } } - [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsQuicSupported))] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsHttp3Supported))] public sealed class TelemetryTest_Http30 : TelemetryTest { protected override Version UseVersion => HttpVersion.Version30; diff --git a/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets b/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets index eceaebf36f48a0..34f1eb1d03eeab 100644 --- a/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets +++ b/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets @@ -49,6 +49,7 @@ Copyright (c) .NET Foundation. All rights reserved. <_EnableConsumingManagedCodeFromNativeHosting Condition="'$(_EnableConsumingManagedCodeFromNativeHosting)' == ''">false true false + false <_UseManagedNtlm Condition="'$(_UseManagedNtlm)' == '' and $(RuntimeIdentifier.StartsWith('linux-bionic'))">true