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

IOControl_SIOCATMARK_Success test improvements - #27583

Merged
stephentoub merged 2 commits into
dotnet:masterfrom
rmkerr:Socket_Siocatmark_TestFix
Mar 1, 2018
Merged

stephentoub merged 2 commits into
dotnet:masterfrom
rmkerr:Socket_Siocatmark_TestFix

Conversation

@rmkerr

@rmkerr rmkerr commented Mar 1, 2018

Copy link
Copy Markdown
Contributor

The behavior of SIOCATMARK varies significantly between different socket implementations. This test ensures that the expected behavior occurs on Windows, Linux, and OSX.

Here's a table with the state on different platforms during the modified test:

  SIOCATMARK(Win) SIOCATMARK(Unix)
Before Data Received: 1 0
After Non-OOB Data Received 1 0
After OOB Data Received (Read pointer not at OOB Mark) 0 0
After OOB Data Received (Read pointer at OOB Mark) 0 1
OOB Data Read (Read pointer at OOB Mark) 1 (1/0)
OOB Data Read (Read pointer not at OOB Mark) 1 0

Note: When the OOB data has been read but the read pointer is still at the OOB mark, behavior varies on Linux and OSX.

For more details check out issue #25639.

@rmkerr rmkerr added test bug Problem in test source code (most likely) area-System.Net.Sockets labels Mar 1, 2018
@rmkerr rmkerr self-assigned this Mar 1, 2018
@rmkerr
rmkerr requested review from davidsh and stephentoub March 1, 2018 00:11

@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 for tracking this down.

@davidsh davidsh left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

Where will this platform difference be documented? Will you be submitting a PR for the doc change or perhaps put in the wiki?

https://github.com/dotnet/corefx/wiki/ApiCompat

@stephentoub
stephentoub merged commit 183606a into dotnet:master Mar 1, 2018
@rmkerr

rmkerr commented Mar 1, 2018

Copy link
Copy Markdown
Contributor Author

I added a note in the compat section of the wiki explaining that the behavior is OS specific. I'll go ahead and add something similar to the docs too.

@karelz karelz added this to the 2.1.0 milestone Mar 10, 2018
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Fiddling with tests.

* Split out tests per platform.


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

Labels

area-System.Net.Sockets test bug Problem in test source code (most likely)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants