Skip to content
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

Merged
merged 11 commits into from
Jun 5, 2020
Merged

Windows: Fixing straightforward issues with //test/common/network/... #11423

merged 11 commits into from
Jun 5, 2020

Conversation

sunjayBhatia
Copy link
Member

@sunjayBhatia sunjayBhatia commented Jun 3, 2020

Commit Message: Windows: Fixing straightforward issues with //test/common/network/...
Additional Description:

  • 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 Windows: Support setting permissions on Unix domain sockets #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

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

sunjayBhatia and others added 6 commits June 3, 2020 12:08
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>
@sunjayBhatia
Copy link
Member Author

cc @wrowe

sunjayBhatia and others added 2 commits June 4, 2020 10:10
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>
wrowe and others added 2 commits June 4, 2020 11:23
…-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>
ggreenway
ggreenway previously approved these changes Jun 4, 2020
Copy link
Contributor

@ggreenway ggreenway left a 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));
Copy link
Contributor

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).

Copy link
Member Author

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

Copy link
Contributor

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!

@ggreenway
Copy link
Contributor

MacOS CI failure is due to bazel version; not related to this PR.

@nigriMSFT
Copy link
Contributor

cc @davinci26

@mattklein123
Copy link
Member

Please merge master to fix CI.

/wait

@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.
CC @envoyproxy/api-watchers: FYI only for changes made to api/.

🐱

Caused by: #11423 was synchronize by sunjayBhatia.

see: more, trace.

@ggreenway
Copy link
Contributor

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>
@sunjayBhatia
Copy link
Member Author

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.

yep, we're fixing it now

@ggreenway
Copy link
Contributor

For reference, these are the commands I run to merge master, with upstream as this (the main) repository, starting with this PR branch checked out:

git fetch upstream master
git merge upstream/master

Copy link
Contributor

@ggreenway ggreenway left a 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.

@wrowe
Copy link
Contributor

wrowe commented Jun 4, 2020

For reference, these are the commands I run to merge master, with upstream as this (the main) repository, starting with this PR branch checked out:

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.

@ggreenway
Copy link
Contributor

For reference, these are the commands I run to merge master, with upstream as this (the main) repository, starting with this PR branch checked out:

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.

@wrowe
Copy link
Contributor

wrowe commented Jun 4, 2020

@ggreenway use azp rekick to try mac over again, looks like an intermittent I/O error.

@ggreenway
Copy link
Contributor

/azp retest macOS

@azure-pipelines
Copy link

Command 'retest' is not supported by Azure Pipelines.

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@ggreenway
Copy link
Contributor

/azp rekick macOS

@azure-pipelines
Copy link

Command 'rekick' is not supported by Azure Pipelines.

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@ggreenway
Copy link
Contributor

/azp run macOS

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@ggreenway
Copy link
Contributor

/azp list

@azure-pipelines
Copy link

CI/CD Pipelines for this repository:

@ggreenway
Copy link
Contributor

/azp run envoy-macos

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@ggreenway
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s), but failed to run 2 pipeline(s).

@wrowe
Copy link
Contributor

wrowe commented Jun 4, 2020

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.

@mattklein123
Copy link
Member

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.

@jmarantz
Copy link
Contributor

jmarantz commented Jun 5, 2020

I just noticed hotrestart tests timing out but we haven't merged that change where I messing with it. That's #11301 .

@jmarantz
Copy link
Contributor

jmarantz commented Jun 5, 2020

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.

@jmarantz
Copy link
Contributor

jmarantz commented Jun 5, 2020

#11459

@htuch htuch removed the api label Jun 5, 2020
@mattklein123 mattklein123 merged commit f0464a4 into envoyproxy:master Jun 5, 2020
@wrowe wrowe deleted the windows-fixing-test-common-network branch June 7, 2020 13:17
yashwant121 pushed a commit to yashwant121/envoy that referenced this pull request Jul 24, 2020
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants