Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Socket.Tests: add CanceledByDispose tests#37706

Closed
tmds wants to merge 7 commits intodotnet:masterfrom
tmds:canceled_by_dispose
Closed

Socket.Tests: add CanceledByDispose tests#37706
tmds wants to merge 7 commits intodotnet:masterfrom
tmds:canceled_by_dispose

Conversation

@tmds
Copy link
Member

@tmds tmds commented May 16, 2019

This takes tests from #37486 to see CI result on Windows without the functional changes. This is not for merging.

@tmds
Copy link
Member Author

tmds commented May 16, 2019

Pipeline configuration error:
/eng/pipelines/windows.yml: Could not find /eng/pipelines/corefx-base.yml in repository self hosted on https://api.github.com using commit a5c7637. GitHub reported the error, "Not Found"

@stephentoub stephentoub added the * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) label May 16, 2019
@tmds
Copy link
Member Author

tmds commented May 16, 2019

corefx-ci (Windows x64_Debug) Cancelled after 150m

It's not clear why this is timing out. Nothing useful in the logs. There doesn't seem to be a log that shows the console output from the test run. Or I don't know how to find it.

tmds added a commit to tmds/corefx that referenced this pull request May 20, 2019
@tmds
Copy link
Member Author

tmds commented May 20, 2019

CI results summarized here:#37486 (comment)

@tmds tmds closed this May 20, 2019
@karelz karelz added this to the 3.0 milestone May 22, 2019
davidsh pushed a commit that referenced this pull request Jun 20, 2019
* Socket: Linux: unblock synchronous socket operations on Dispose

* Fix windows build

* TryUnblockSocket: always do an abortive close for TCP

* TryUnblockSocket: experiment, always call Shutdown

* SyncTcpReceiveSendGetsCancelledByDisposeOrClose: Don't check for abortive close

* Fix build

* Revert always shutdown to compare CI results

* PR feedback

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race II

* Fix test

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race III

* TcpReceiveSendGetsCanceledByDisposeOrClose: only run on Sync

* Also perform abortive close when canceling async send/receive

* Fix aborted set to true

* Check what fails on OSX with Shutdown

* Revert "Check what fails on OSX with Shutdown"

This reverts commit 5ab7fce.

* Don't perform abortive close for operations that were already canceled

* interrup  Accept/Listen on OSX

* Find out what Disconnectx does for different tests on CI machines

* Move Linux connect AF_UNSPEC and OSX disconnectx into pal Disconnect function, update tests for OSX

* Trigger CI

* TcpReceiveSendGetsCanceledByDispose: check SocketErrorCode

* TcpReceiveSendGetsCanceledByDispose: OSX is also performing an RST close for disconnectx

* Revert "TcpReceiveSendGetsCanceledByDispose: OSX is also performing an RST close for disconnectx"

This reverts commit a8d5b02.

* TcpReceiveSendGetsCanceledByDispose: fix test for OSX

* call CancelIoEx to kick out pending operations

* Socket interop: replace IntPtr with SafeHandle

* Windows: RST close when operations were canceled

* Extend tests to check local SocketError

* test: update expected SocketErrors

* update tests: Apm API throws ObjectDisposedException instead of SocketException

* Extend asserts

* Update expected result for ConnectTask

* Update tests based on Windows behavior (#37706)

* Map SocketErrors in Socket.cs

* Rewrite nullable asserts

* Fix test for Mac

* Handle SendFile SocketError

* SyncSendFileGetsCanceledByDispose: change how we generate the large file

* SyncSendFileGetsCanceledByDispose: ensure unique filename

* Fix NETFX build

* SyncSendFileGetsCanceledByDispose: skip on NetFramework

* PR feedback

* Fix broken build

* Perform DangerousAddRef for Socket used with UpdateAcceptContext socket option
steveharter pushed a commit to steveharter/dotnet_corefx that referenced this pull request Jun 25, 2019
…et#37486)

* Socket: Linux: unblock synchronous socket operations on Dispose

* Fix windows build

* TryUnblockSocket: always do an abortive close for TCP

* TryUnblockSocket: experiment, always call Shutdown

* SyncTcpReceiveSendGetsCancelledByDisposeOrClose: Don't check for abortive close

* Fix build

* Revert always shutdown to compare CI results

* PR feedback

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race II

* Fix test

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race III

* TcpReceiveSendGetsCanceledByDisposeOrClose: only run on Sync

* Also perform abortive close when canceling async send/receive

* Fix aborted set to true

* Check what fails on OSX with Shutdown

* Revert "Check what fails on OSX with Shutdown"

This reverts commit 5ab7fce.

* Don't perform abortive close for operations that were already canceled

* interrup  Accept/Listen on OSX

* Find out what Disconnectx does for different tests on CI machines

* Move Linux connect AF_UNSPEC and OSX disconnectx into pal Disconnect function, update tests for OSX

* Trigger CI

* TcpReceiveSendGetsCanceledByDispose: check SocketErrorCode

* TcpReceiveSendGetsCanceledByDispose: OSX is also performing an RST close for disconnectx

* Revert "TcpReceiveSendGetsCanceledByDispose: OSX is also performing an RST close for disconnectx"

This reverts commit a8d5b02.

* TcpReceiveSendGetsCanceledByDispose: fix test for OSX

* call CancelIoEx to kick out pending operations

* Socket interop: replace IntPtr with SafeHandle

* Windows: RST close when operations were canceled

* Extend tests to check local SocketError

* test: update expected SocketErrors

* update tests: Apm API throws ObjectDisposedException instead of SocketException

* Extend asserts

* Update expected result for ConnectTask

* Update tests based on Windows behavior (dotnet#37706)

* Map SocketErrors in Socket.cs

* Rewrite nullable asserts

* Fix test for Mac

* Handle SendFile SocketError

* SyncSendFileGetsCanceledByDispose: change how we generate the large file

* SyncSendFileGetsCanceledByDispose: ensure unique filename

* Fix NETFX build

* SyncSendFileGetsCanceledByDispose: skip on NetFramework

* PR feedback

* Fix broken build

* Perform DangerousAddRef for Socket used with UpdateAcceptContext socket option
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…et/corefx#37486)

* Socket: Linux: unblock synchronous socket operations on Dispose

* Fix windows build

* TryUnblockSocket: always do an abortive close for TCP

* TryUnblockSocket: experiment, always call Shutdown

* SyncTcpReceiveSendGetsCancelledByDisposeOrClose: Don't check for abortive close

* Fix build

* Revert always shutdown to compare CI results

* PR feedback

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race II

* Fix test

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race III

* TcpReceiveSendGetsCanceledByDisposeOrClose: only run on Sync

* Also perform abortive close when canceling async send/receive

* Fix aborted set to true

* Check what fails on OSX with Shutdown

* Revert "Check what fails on OSX with Shutdown"

This reverts commit dotnet/corefx@5ab7fce.

* Don't perform abortive close for operations that were already canceled

* interrup  Accept/Listen on OSX

* Find out what Disconnectx does for different tests on CI machines

* Move Linux connect AF_UNSPEC and OSX disconnectx into pal Disconnect function, update tests for OSX

* Trigger CI

* TcpReceiveSendGetsCanceledByDispose: check SocketErrorCode

* TcpReceiveSendGetsCanceledByDispose: OSX is also performing an RST close for disconnectx

* Revert "TcpReceiveSendGetsCanceledByDispose: OSX is also performing an RST close for disconnectx"

This reverts commit dotnet/corefx@a8d5b02.

* TcpReceiveSendGetsCanceledByDispose: fix test for OSX

* call CancelIoEx to kick out pending operations

* Socket interop: replace IntPtr with SafeHandle

* Windows: RST close when operations were canceled

* Extend tests to check local SocketError

* test: update expected SocketErrors

* update tests: Apm API throws ObjectDisposedException instead of SocketException

* Extend asserts

* Update expected result for ConnectTask

* Update tests based on Windows behavior (dotnet/corefx#37706)

* Map SocketErrors in Socket.cs

* Rewrite nullable asserts

* Fix test for Mac

* Handle SendFile SocketError

* SyncSendFileGetsCanceledByDispose: change how we generate the large file

* SyncSendFileGetsCanceledByDispose: ensure unique filename

* Fix NETFX build

* SyncSendFileGetsCanceledByDispose: skip on NetFramework

* PR feedback

* Fix broken build

* Perform DangerousAddRef for Socket used with UpdateAcceptContext socket option


Commit migrated from dotnet/corefx@3fac6ad
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

* NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants