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

increase BufferPtrSendOperation test coverage #38935

Merged

Conversation

adamsitnik
Copy link
Member

@stephentoub wrote in #38762 (comment)

What distresses me is that the tests passed with this PR. If anything, the thing to fix here is ensuring we have tests in place to cover this case. This type will be used when performing synchronous sends on a socket that previously had asynchronous operations performed on it, and a mistake in the arguments here would manifest as a bug if the send didn't complete in one call due to the kernel buffer being full, so it's certainly harder to test, but not impossible.

recently I've spent some time debugging CopyToAsync_AllDataCopied (#38747) and I think that it's a good candidate for extending to test the sync path as well

…a usage of sync method that uses BufferPtrSendOperation internally
@adamsitnik adamsitnik added this to the 5.0.0 milestone Jul 8, 2020
@adamsitnik adamsitnik requested a review from stephentoub July 8, 2020 15:44
@adamsitnik adamsitnik self-assigned this Jul 8, 2020
@ghost
Copy link

ghost commented Jul 8, 2020

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Thanks. Did you confirm this hits that code path?

@safern safern mentioned this pull request Jul 8, 2020
@adamsitnik
Copy link
Member Author

adamsitnik commented Jul 9, 2020

Did you confirm this hits that code path?

Yes, but only by inspecting the code, not actually running it (I've run in on Windows, not on Linux).

@adamsitnik adamsitnik closed this Jul 9, 2020
@adamsitnik adamsitnik reopened this Jul 9, 2020
@adamsitnik
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@adamsitnik
Copy link
Member Author

The CI failure is not related to this change (#38998), merging

@adamsitnik adamsitnik merged commit f4b25a2 into dotnet:master Jul 9, 2020
@adamsitnik adamsitnik deleted the BufferPtrSendOperationTestCoverage branch July 9, 2020 16:33
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants