-
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
Use os_sys_calls in all code paths to replace raw syscalls #10107
Use os_sys_calls in all code paths to replace raw syscalls #10107
Conversation
This PR seeks to address all remaining changes to the linux and os/x code paths, in order to consolidate the necessary patch review requirements. The subsequent PR(s) should not include changes impacting the current working linux and os/x code paths. Primarilly adds usage of os_sys_calls for various network and test sources. Addresses a reoccuring issue that only linux/posix allows for connection -to- an any-address, on Windows and in general, this makes no sense. So several tests are adjusted to explicitly connect to the loopback interface of the "any" if listener. Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io> Signed-off-by: William A Rowe Jr <wrowe@pivotal.io> Co-authored-by: Sunjay Bhatia <sbhatia@pivotal.io> Co-authored-by: William A Rowe Jr <wrowe@pivotal.io>
Signed-off-by: William A Rowe Jr <wrowe@pivotal.io> Co-authored-by: Sunjay Bhatia <sbhatia@pivotal.io>
Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io> Co-authored-by: William A Rowe Jr <wrowe@pivotal.io>
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.
Thanks. I had a few questions, but looks pretty good.
- Relies on localAddress() to return an explicit local if:port as proposed by zuercher - Correct test regressions by introducing appropriate mocks - Drop posix ::dup call by closing and reusing the same if:port for socket in ListenSocketImplTest/testBindSpecificPort Signed-off-by: William A Rowe Jr <wrowe@pivotal.io> Co-authored-by: Sunjay Bhatia <sbhatia@pivotal.io> Co-authored-by: William A Rowe Jr <wrowe@pivotal.io>
Circle CI failing due to #10012
|
Need to keep this apparently duplicate logic due to the scope of the cmsg buffer Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io> Co-authored-by: William A Rowe Jr <wrowe@pivotal.io>
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.
I think there's one more location we can use sockAddr/sockAddrLen(), but otherwise looks good!
Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
@zuercher any idea how to get CI for this unstuck? looks like the coverage tests failed again on the same flake but not even the sign-off check has run |
Confirming CircleCI coverage is failing on the usual flake (same as issue #10012), but this PR appears good to go; [ RUN ] Protocols/BufferIntegrationTest.RouterRequestPopulateContentLengthOnTrailers/IPv4_HttpDownstream_HttpUpstream
|
@mattklein123 (or maybe @lizan) I think if this is to be merged without coverage passing one of you is going to have to push the button. |
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.
One small question/comment. Thank you!
/wait
Can you merge master to fix coverage? |
will do! |
- so we can re-discuss as it changes linux functionality - we can re-evaluate for Windows as well Signed-off-by: William A Rowe Jr <wrowe@pivotal.io> Co-authored-by: Sunjay Bhatia <sbhatia@pivotal.io>
Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io> Co-authored-by: William A Rowe Jr <wrowe@pivotal.io>
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.
Thanks!
Description:
Risk Level: Low
Testing: Local Linux gcc and Windows MSVC
Docs Changes: N/A
Release Notes: N/A