-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Elide SocketFlags in Socket API #57634
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsFix #43934
|
I've left out runtime/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs Line 1810 in 69de57b
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution! The implementation looks good.
What's worrying me that the overloads that elide SocketFlags
are missing test coverage (both old and new ones). I think we should fix this as part of the current PR.
I believe it would be an overkill to address this by duplicating our tests a couple of more times by adding more SocketHelperBase
subclasses, unnecessarily penalizing our test execution time. My recommendation would be to change the existing SocketHelperTask
and SocketHelperSpanSync
to elide SocketFlags
in their calls to Socket
. We aren't really testing the effect of SocketFlags
in those tests anyways. @geoffkizer do you agree?
I've left out
ReceiveMessageFrom
as theSocketFlags
does return data from the operation:
@geoffkizer do you think it's a useful overload regardless? The approved proposal is also questioning them: #43934 (comment)
Done.
I'll add that also in the sync overloads, there's an overload for |
Just to be clear -- the idea here is that we cover these new overloads by making some of the existing test variations use them, but leave some using the old overloads so we continue to have coverage for those as well? That seems reasonable to me. Let's make sure to add comments that explain this, otherwise it will be far from obvious and we'll look at the code in the future and say "why are we using these overloads here but those overloads there??" |
This is a strong argument for not eliding the flags on ReceiveMessageFrom. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one thing, and this is good to merge. I think we should leave out the sync ReceiveMessageFrom
.
src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketTestHelper.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Shall be good to merge once outerloop CI completes.
Outerloop failures are unrelated (#32955 and a bunch of ProcessStartInfo tests on Windows 11). |
@i3arnon thanks again for the work and your patience! |
Fix #43934