Skip to content

tests: allow retries on transient bind errors (WSAEADDRNOTAVAIL, WSAEADDRINUSE) in socket_helper - #5515

Open
adri22235 wants to merge 3 commits into
microsoft:mainfrom
adri22235:fix/socket-bind-ipv6-wsaeaddrnotavail
Open

tests: allow retries on transient bind errors (WSAEADDRNOTAVAIL, WSAEADDRINUSE) in socket_helper#5515
adri22235 wants to merge 3 commits into
microsoft:mainfrom
adri22235:fix/socket-bind-ipv6-wsaeaddrnotavail

Conversation

@adri22235

Copy link
Copy Markdown

Description

In CI test runners (such as Windows Server 2025 virtual machine environments), IPv6 and Dual Stack local interface bindings can experience transient delays during socket initialization, returning WSAEADDRNOTAVAIL (10049) or WSAEADDRINUSE (10048).

Currently, _base_socket::_base_socket immediately invokes FAIL() on any error other than WSAENOBUFS, aborting on the very first attempt without utilizing the 5-iteration retry loop.

Fix:

  • Added is_transient_error helper in tests/libs/util/socket_helper.cpp to recognize WSAEADDRNOTAVAIL (10049) and WSAEADDRINUSE (10048) alongside WSAENOBUFS (10055).
  • Allows the retry loop with Sleep(1000) to retry binding during transient adapter readiness delays.

Testing

  • Formatted with Clang 19.1.7.
  • Verified logic in tests/libs/util/socket_helper.cpp.

@adri22235

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@github-actions

Copy link
Copy Markdown
Contributor

This pull request isn't linked to any GitHub issue. Please reference an issue with a keyword such as Fixes #123, Closes #456, etc., so the work can be tracked.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request isn't linked to any GitHub issue. Please reference an issue with a keyword such as Fixes #123, Closes #456, etc., so the work can be tracked.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request isn't linked to any GitHub issue. Please reference an issue with a keyword such as Fixes #123, Closes #456, etc., so the work can be tracked.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

This pull request isn't linked to any GitHub issue. Please reference an issue with a keyword such as Fixes #123, Closes #456, etc., so the work can be tracked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants