Skip to content
Open
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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "11.0.0-prerelease.26117.1",
"version": "11.0.0-prerelease.26168.1",
"commands": [
"xharness"
]
Expand Down
1 change: 0 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-emsdk -->
<add key="darc-pub-dotnet-emsdk-fb1326b" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-fb1326b0/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-emsdk -->
<!-- Begin: Package sources from dotnet-sdk -->
<!-- End: Package sources from dotnet-sdk -->
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,17 +320,17 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>b030c4dfdfa1bf287f10f96006619a06bc2000ae</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="11.0.0-prerelease.26117.1">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="11.0.0-prerelease.26168.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>0eeaa60169fe6a95932d29d822e20eb225ce0143</Sha>
<Sha>607b3de9cf2dbfec6734e686e68d2813b40b2b51</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="11.0.0-prerelease.26117.1">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="11.0.0-prerelease.26168.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>0eeaa60169fe6a95932d29d822e20eb225ce0143</Sha>
<Sha>607b3de9cf2dbfec6734e686e68d2813b40b2b51</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="11.0.0-prerelease.26117.1">
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="11.0.0-prerelease.26168.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>0eeaa60169fe6a95932d29d822e20eb225ce0143</Sha>
<Sha>607b3de9cf2dbfec6734e686e68d2813b40b2b51</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="9.0.0-beta.26123.3">
<Uri>https://github.com/dotnet/arcade</Uri>
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@
<MicrosoftNETCoreCoreDisToolsVersion>1.4.0</MicrosoftNETCoreCoreDisToolsVersion>
<MicrosoftNETTestSdkVersion>17.4.0-preview-20220707-01</MicrosoftNETTestSdkVersion>
<!-- xharness -->
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>11.0.0-prerelease.26117.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>11.0.0-prerelease.26117.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>11.0.0-prerelease.26117.1</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>11.0.0-prerelease.26168.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>11.0.0-prerelease.26168.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>11.0.0-prerelease.26168.1</MicrosoftDotNetXHarnessCLIVersion>
<!-- hotreload-utils -->
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>9.0.0-alpha.0.26152.4</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<NUnitVersion>3.12.0</NUnitVersion>
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ jobs:
# Public Linux Build Pool
${{ if and(or(in(parameters.osGroup, 'linux', 'freebsd', 'android', 'tizen'), eq(parameters.jobParameters.hostedOs, 'linux')), eq(variables['System.TeamProject'], 'public')) }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
demands: ImageOverride -equals build.azurelinux.3.amd64.open

# Official Build Linux Pool
${{ if and(or(in(parameters.osGroup, 'linux', 'freebsd', 'android', 'tizen'), eq(parameters.jobParameters.hostedOs, 'linux')), ne(variables['System.TeamProject'], 'public')) }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals 1es-ubuntu-2204
demands: ImageOverride -equals build.azurelinux.3.amd64
os: linux

# OSX Public Build Pool (we don't have on-prem OSX BuildPool).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace System.Net.Quic.Tests
{
[Collection(nameof(QuicTestCollection))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest), nameof(QuicTestBase.IsNotAzureLinux3VM))]
[SkipOnPlatform(TestPlatforms.Windows, "CipherSuitesPolicy is not supported on Windows")]
public class MsQuicCipherSuitesPolicyTests : QuicTestBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace System.Net.Quic.Tests
{
[Collection(nameof(QuicTestCollection))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest), nameof(QuicTestBase.IsNotAzureLinux3VM))]
public class MsQuicRemoteExecutorTests : QuicTestBase
{
public MsQuicRemoteExecutorTests()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void Dispose()
}

[Collection(nameof(QuicTestCollection))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest), nameof(QuicTestBase.IsNotAzureLinux3VM))]
public class MsQuicTests : QuicTestBase, IClassFixture<CertificateSetup>
{
private static byte[] s_data = "Hello world!"u8.ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace System.Net.Quic.Tests
using Configuration = System.Net.Test.Common.Configuration;

[Collection(nameof(QuicTestCollection))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest), nameof(QuicTestBase.IsNotAzureLinux3VM))]
public sealed class QuicConnectionTests : QuicTestBase
{
const int ExpectedErrorCode = 1234;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace System.Net.Quic.Tests
{
[Collection(nameof(QuicTestCollection))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest), nameof(QuicTestBase.IsNotAzureLinux3VM))]
public sealed class QuicListenerTests : QuicTestBase
{
public QuicListenerTests(ITestOutputHelper output) : base(output) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace System.Net.Quic.Tests
{
[Collection(nameof(QuicTestCollection))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest), nameof(QuicTestBase.IsNotAzureLinux3VM))]
public sealed class QuicStreamConformanceTests : ConnectedStreamConformanceTests
{
protected override bool UsableAfterCanceledReads => false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace System.Net.Quic.Tests
{
[Collection(nameof(QuicTestCollection))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest))]
[ConditionalClass(typeof(QuicTestBase), nameof(QuicTestBase.IsSupported), nameof(QuicTestBase.IsNotArm32CoreClrStressTest), nameof(QuicTestBase.IsNotAzureLinux3VM))]
public sealed class QuicStreamTests : QuicTestBase
{
private static byte[] s_data = "Hello world!"u8.ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public abstract class QuicTestBase : IDisposable

public static bool IsSupported => QuicListener.IsSupported && QuicConnection.IsSupported;
public static bool IsNotArm32CoreClrStressTest => !(CoreClrConfigurationDetection.IsStressTest && PlatformDetection.IsArmProcess);
//[ActiveIssue("https://github.com/dotnet/runtime/issues/123216")]
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a commented-out [ActiveIssue(...)] line left in the source. Commented attributes tend to become stale and don't get picked up by test infrastructure; please either remove the commented line or reintroduce the skip using the actual [ActiveIssue] attribute (or another tracked skip mechanism) so the issue link is preserved in test results.

Suggested change
//[ActiveIssue("https://github.com/dotnet/runtime/issues/123216")]

Copilot uses AI. Check for mistakes.
public static bool IsNotAzureLinux3VM => !PlatformDetection.IsAzureLinux || PlatformDetection.IsInContainer;

public static bool IsIPv6Available => Configuration.Sockets.IsIPv6LoopbackAvailable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<data name="net_Websockets_ClientReceivedMaskedFrame" xml:space="preserve">
<value>The WebSocket server sent a masked frame.</value>
</data>
<data name="net_Websockets_ServerReceivedUnmaskedFrame" xml:space="preserve">
<value>The WebSocket client sent an unmasked frame.</value>
</data>
<data name="net_Websockets_ContinuationFromFinalFrame" xml:space="preserve">
<value>The WebSocket received a continuation frame from a previous final message.</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,11 @@ private async ValueTask CloseWithReceiveErrorAndThrowAsync(
// Consume the mask bytes
ConsumeFromBuffer(4);
}
else if (_isServer)
{
resultHeader = default;
return SR.net_Websockets_ServerReceivedUnmaskedFrame;
}

// Do basic validation of the header
switch (header.Opcode)
Expand Down
14 changes: 14 additions & 0 deletions src/libraries/System.Net.WebSockets/tests/WebSocketTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,20 @@ public async Task ThrowWhenContinuationWithDifferentCompressionFlags()
client.SendAsync(Memory<byte>.Empty, WebSocketMessageType.Binary, WebSocketMessageFlags.EndOfMessage, default));
}

[Fact]
public async Task ReceiveAsync_ServerUnmaskedFrame_ThrowsWebSocketException()
{
byte[] frame = { 0x81, 0x05, 0x48, 0x65, 0x6C, 0x6C, 0x6F };
using var stream = new MemoryStream();
stream.Write(frame, 0, frame.Length);
stream.Position = 0;
using WebSocket websocket = WebSocket.CreateFromStream(stream, new WebSocketCreationOptions { IsServer = true });
WebSocketException exception = await Assert.ThrowsAsync<WebSocketException>(() =>
websocket.ReceiveAsync(new byte[5], CancellationToken.None));
Assert.Equal(SR.net_Websockets_ServerReceivedUnmaskedFrame, exception.Message);
Assert.Equal(WebSocketState.Aborted, websocket.State);
}

[Fact]
public async Task ReceiveAsync_WhenDisposedInParallel_DoesNotGetStuck()
{
Expand Down
Loading