-
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
Windows: Fixing straightforward issues with //test/common/network/... #11423
Windows: Fixing straightforward issues with //test/common/network/... #11423
Conversation
Do not use SO_REUSEADDR on Windows Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io>
See: #11354 Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io> Co-authored-by: Sunjay Bhatia <sbhatia@pivotal.io> Signed-off-by: William A Rowe Jr <wrowe@pivotal.io> Co-authored-by: William A Rowe Jr <wrowe@pivotal.io>
struct linger contains ushorts not ints on Windows, so instead of hard coding linger buffer value, construct one and generate string representation on the fly. Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io> Co-authored-by: Sunjay Bhatia <sbhatia@pivotal.io> Signed-off-by: William A Rowe Jr <wrowe@pivotal.io> Co-authored-by: William A Rowe Jr <wrowe@pivotal.io>
Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io> Co-authored-by: Sunjay Bhatia <sbhatia@pivotal.io> Signed-off-by: William A Rowe Jr <wrowe@pivotal.io> Co-authored-by: William A Rowe Jr <wrowe@pivotal.io>
returning a raw struct from createCallbackOnPort caused invalid memory access issues with msvc on Windows when the mocked methods were called, instead return a pointer Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
cc @wrowe |
Surface additional failing tests for visibility before we get Windows running in CI. Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
…ng-test-common-network Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
…-common-network Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
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.
This looks fine to me, assuming it passes CI. Nice to remove some fails_on_windows
tags.
@@ -691,7 +691,7 @@ class MockBootstrapExtensionFactory : public BootstrapExtensionFactory { | |||
MOCK_METHOD(BootstrapExtensionPtr, createBootstrapExtension, | |||
(const Protobuf::Message&, Configuration::ServerFactoryContext&), (override)); | |||
MOCK_METHOD(ProtobufTypes::MessagePtr, createEmptyConfigProto, (), (override)); | |||
MOCK_METHOD(std::string, name, (), (const override)); | |||
MOCK_METHOD(std::string, name, (), (const, override)); |
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.
Can you explain what's going on here? (I don't object to the change; I don't understand what is going on here, and why this broke windows).
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.
MSVC doesn't accept the two specifiers without a comma, it errors with .\test/mocks/server/mocks.h(694): error C2338: const override cannot be recognized as a valid specification modifier.
, from the google test cheatsheet, it seems a comma separated list is the correct way to specify multiple keywords: https://github.com/google/googletest/blob/master/googlemock/docs/cheat_sheet.md#mocking-a-normal-class-mockclass
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.
That's really interesting. Thanks for the explanation!
MacOS CI failure is due to bazel version; not related to this PR. |
cc @davinci26 |
Please merge master to fix CI. /wait |
Something went wrong with how you tried to merge master. You've added new, different commits with the same content as the commits on master. Please undo whatever you did and try again. /wait |
…-common-network Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
yep, we're fixing it now |
For reference, these are the commands I run to merge master, with
|
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.
That looks better; thanks.
Thanks, we had encountered a problem with the merge and buildifier spec, and in dropping a patch ended up with a rebase rather than merge of origin/master. Fixed, and (our apologies) force-pushed to resolve. |
No problem; git is easy to mess up. |
@ggreenway use azp rekick to try mac over again, looks like an intermittent I/O error. |
/azp retest macOS |
Command 'retest' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
/azp rekick macOS |
Command 'rekick' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
/azp run macOS |
No pipelines are associated with this pull request. |
/azp list |
CI/CD Pipelines for this repository: |
/azp run envoy-macos |
Azure Pipelines failed to run 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 2 pipeline(s). |
And... //test/integration:hotrestart_test timing out for Linux-x64 asan. Will need to be re-kicked, curious first whether tsa/compile_time_options both pass, first. |
I've seen the hot restart tests timing out a lot recently, @jmarantz potentially due to your recent change? I can try to take a look tomorrow. |
I just noticed hotrestart tests timing out but we haven't merged that change where I messing with it. That's #11301 . |
When testing hotrestart_test locally on an unrelated PR, it passed in 210 seconds, but I could see the machines in CI might be a bit slower than my desktop. I'm going to write a small PR to add a size-tag to this test to see if that resolves the issue. |
…envoyproxy#11423) Do not use SO_REUSEADDR on Windows as it does not behave the same as Linux and other BSD socket stacks Disable pipe mode test on Windows, see envoyproxy#11354 socket_option_factory_test no longer hard codes socket option value as struct linger consists of ushorts not ints on Windows allocate callback handles on heap instead of stack to work around MSVC enable address_impl_speed_test_benchmark_test additionally, tag new failing tests on Windows Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
Commit Message: Windows: Fixing straightforward issues with //test/common/network/...
Additional Description:
Risk Level: Low
Testing: Fixes Windows invocations of tests, excludes some on Windows, ran locally on Windows w/ MSVC
Docs Changes: N/A
Release Notes: N/A