Skip to content

Disabling two socket tests #93916

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

Merged
merged 3 commits into from
Oct 29, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ public async Task Connect_AfterDisconnect_Fails()
[InlineData("[::ffff:1.1.1.1]", true, false)]
public async Task ConnectGetsCanceledByDispose(string addressString, bool useDns, bool owning)
{
if (UsesSync && !PlatformDetection.IsWindows)
Copy link
Member

Choose a reason for hiding this comment

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

Is there need to disable this also on macOS? It feels like !IsWindows should really be IsLinux????
Also this is regression in particular Linux Kernels. At that seems rare at this moment. It may be worth of adding version check instead of blindly disabling Linux runs -> it should still work on most supported distributions AFAIK.

Copy link
Member Author

@liveans liveans Oct 29, 2023

Choose a reason for hiding this comment

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

Ah yes, I've missed it. It should work as expected on macOS, thanks for catching that. I'll change it with another PR.

For the version controlling, AFAIK, only the latest kernel versions have this problem. Is there any example of version checking on Linux in .NET?

Copy link
Member

Choose a reason for hiding this comment

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

It may be worth of adding version check instead of blindly disabling Linux runs

The change is being backported to some kernels, since it's considered to be security sensitive. I think it would be very difficult if not impossible to determine only by kernel version if a system is impacted.

{
// [ActiveIssue("https://github.com/dotnet/runtime/issues/94149", TestPlatforms.Linux)]
return;
}

// Aborting sync operations for non-owning handles is not supported on Unix.
if (!owning && UsesSync && !PlatformDetection.IsWindows)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ await listener.RunWithCallbackAsync(e => events.Enqueue((e, e.ActivityId)), asyn
}, connectMethod, useDnsEndPoint.ToString()).Dispose();
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/94149", TestPlatforms.Linux)]
[OuterLoop]
[ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
[SkipOnPlatform(TestPlatforms.OSX | TestPlatforms.FreeBSD, "Same as Connect.ConnectGetsCanceledByDispose")]
Expand Down