Skip to content

increase BufferPtrSendOperation test coverage - #38935

Merged
adamsitnik merged 1 commit into
dotnet:masterfrom
adamsitnik:BufferPtrSendOperationTestCoverage
Jul 9, 2020
Merged

increase BufferPtrSendOperation test coverage#38935
adamsitnik merged 1 commit into
dotnet:masterfrom
adamsitnik:BufferPtrSendOperationTestCoverage

Conversation

@adamsitnik

Copy link
Copy Markdown
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

ghost commented Jul 8, 2020

Copy link
Copy Markdown

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

@wfurt wfurt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@stephentoub stephentoub left a comment

Copy link
Copy Markdown
Member

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

adamsitnik commented Jul 9, 2020

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
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
Copy Markdown
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