-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
test/system: fix wait_for_port() to wait for bind #17707
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold lets wait for @edsantiago to confirm this change when he is back |
Well... I've never seen a flake in the tests that use |
Found the problem, |
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.
Nice catch. LGTM with one request.
The goal of the wait_for_port() function is to return when the port is bound. This is to make sure we wait for application startup time. This can be seen in some comments of the callers. Commit 7e3d04f caused this regression while reworking the logic to read ports from /proc. I doesn't seem to cause problems in CI, properly because the function returns before the port is bound. I have not seen any flakes related to this but I only see the ones on PRs where I rerun tests so it is best to wait for Ed to take a look. Also fixes the broken ipv4_to_procfs() which only passes one argument to __ipv4_to_procfs(), this results in the ipv4 not beeing inverted. Therefore all bind checks against a direct ipv4 did not work. This function accepts only an ipv4 but one caller passes localhost which is invalid. Signed-off-by: Paul Holzinger <[email protected]>
Thank you! /lgtm |
/hold cancel |
The goal of the wait_for_port() function is to return when the port is bound. This is to make sure we wait for application startup time. This can be seen in some comments of the callers.
Commit 7e3d04f caused this regression while reworking the logic to read ports from /proc. I doesn't seem to cause problems in CI, properly because the function returns before the port is bound. I have not seen any flakes related to this but I only see the ones on PRs where I rerun tests so it is best to wait for Ed to take a look.
Also fixes the broken ipv4_to_procfs() which only passes one argument to
__ipv4_to_procfs(), this results in the ipv4 not beeing inverted.
Therefore all bind checks against a direct ipv4 did not work.
This function accepts only an ipv4 but one caller passes localhost
which is invalid.
Does this PR introduce a user-facing change?