Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try running stub msquic on CI #2111

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/libraries/System.Net.Quic/NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="general-testing" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json" />
</packageSources>
</configuration>
16 changes: 1 addition & 15 deletions src/libraries/System.Net.Quic/src/System.Net.Quic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<Compile Include="System\Net\Quic\Implementations\Mock\MockConnection.cs" />
<Compile Include="System\Net\Quic\Implementations\Mock\MockStream.cs" />
<Compile Include="System\Net\Quic\NetEventSource.Quic.cs" />
<Compile Include="System\Net\Quic\QuicClientConnectionOptions.cs" />
<Compile Include="System\Net\Quic\QuicClientConnectionOptions.cs" />
<Compile Include="System\Net\Quic\QuicImplementationProviders.cs" />
<Compile Include="System\Net\Quic\QuicConnection.cs" />
<Compile Include="System\Net\Quic\QuicListener.cs" />
Expand Down Expand Up @@ -89,18 +89,4 @@
<Reference Include="System.Threading.Channels" />
<Reference Include="System.Threading.ThreadPool" />
</ItemGroup>
<ItemGroup>
<Content Include="msquic.dll" Condition="Exists('msquic.dll')">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="libmsquic.so" Condition="Exists('libmsquic.so')">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="msquic.pdb" Condition="Exists('msquic.pdb')">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ private unsafe MsQuicApi()
uint status = Interop.MsQuic.MsQuicOpen(version: 1, out registration);
if (!MsQuicStatusHelper.SuccessfulStatusCode(status))
{
throw new NotSupportedException(SR.net_quic_notsupported);
throw new NotSupportedException($"status:{status}{SR.net_quic_notsupported}");
}
}
catch (DllNotFoundException)
catch (DllNotFoundException ex)
{
throw new NotSupportedException(SR.net_quic_notsupported);
throw new NotSupportedException($"{ex.Message}{SR.net_quic_notsupported}");
}

MsQuicNativeMethods.NativeApi nativeRegistration = *registration;
Expand Down Expand Up @@ -141,13 +141,13 @@ static MsQuicApi()
// - Otherwise, dial this in to reflect actual minimum requirements and add some sort of platform
// error code mapping when creating exceptions.

OperatingSystem ver = Environment.OSVersion;
// OperatingSystem ver = Environment.OSVersion;

if (ver.Platform == PlatformID.Win32NT && ver.Version < new Version(10, 0, 19041, 0))
{
IsQuicSupported = false;
return;
}
// if (ver.Platform == PlatformID.Win32NT && ver.Version < new Version(10, 0, 19041, 0))
// {
// IsQuicSupported = false;
// return;
// }

// TODO: try to initialize TLS 1.3 in SslStream.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ internal sealed class MsQuicSession : IDisposable

internal MsQuicSession()
{
if (!MsQuicApi.IsQuicSupported)
{
throw new NotSupportedException(SR.net_quic_notsupported);
}
//if (!MsQuicApi.IsQuicSupported)
//{
// throw new NotSupportedException(SR.net_quic_notsupported);
//}
}

public IntPtr ConnectionOpen(QuicClientConnectionOptions options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

namespace System.Net.Quic.Tests
{
[ConditionalClass(typeof(QuicConnection), nameof(QuicConnection.IsQuicSupported))]
public class MsQuicTests : MsQuicTestBase
{
private static ReadOnlyMemory<byte> s_data = Encoding.UTF8.GetBytes("Hello world!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@
<Link>Common\System\Threading\Tasks\TaskTimeoutExtensions.cs</Link>
</Compile>
</ItemGroup>

<ItemGroup>
<PackageReference Include="MsQuicPackage.win-x64" Version="1.0.10">
</PackageReference>
</ItemGroup>

</Project>