-
Notifications
You must be signed in to change notification settings - Fork 30k
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: introduce a broadcast helper #2851
Conversation
|
||
return broadcastIPv4; | ||
} | ||
}) |
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.
Missing semicolon
0b547fd
to
245799c
Compare
Object.defineProperty(exports, 'broadcastIPv4', { | ||
|
||
get: function() { | ||
if (broadcastIPv4 !== null) return broadcastIPv4; |
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.
Where is it declared?
245799c
to
1feb451
Compare
fixed some linting issues and a missing variable declaration. |
Introduce a helper - very similar to `common.localhostIPv4` that allows test runner to override a broadcast address. This is required in certain scenarios - like FreeBSD jails - since networking acts a bit different. Refs: nodejs#2472
1feb451
to
48f0a61
Compare
@@ -107,6 +108,27 @@ Object.defineProperty(exports, 'localhostIPv4', { | |||
} | |||
}); | |||
|
|||
Object.defineProperty(exports, 'broadcastIPv4', { | |||
|
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.
Nit: rm blank line for consistency with the other similar blocks.
Nit: There's enough repeated code between the getters for |
Should be good enough for ci now: https://ci.nodejs.org/job/node-test-pull-request/292/ |
LGTM if CI is happy |
Lets get the refactor in while at it. |
This doesn't seem to solve the problem with |
@Trott I emailed the servers admins a while ago; looks like the broadcast address is set incorrectly. |
It does seem to fix it for FreeBSD 64-bit, so that's good! |
And on 32-bit, although it doesn't make the test pass, it is an improvement. Without this change, test output was:
With this change:
That's several steps in the right direction. |
@Trott refactor lgtm as well? |
@jbergstroem Yes, LGTM with the refactor. |
I prefer writing the function after the variable declaration but I am okay with landing as it is. LGTM |
I'll see if there's anything we can do in the host machine about broadcast before merging this so we actually "fix" the issue. Otherwise we might have to work around it in our CI. |
Host rebooted, should've fixed the broadcast. I think we have a winner: https://ci.nodejs.org/job/node-test-pull-request/300/ @thefourtheye I'll move the function below. |
https://ci.nodejs.org/job/node-test-commit-other/647/ It's actually worse now. Now both 64-bit and 32-bit FreeBSD are failing and the On the upside, they are getting a specific broadcast address that isn't 255.255.255.255. |
That's unfortunate. This PR should be pretty much ok to land since it at least gives us control. I'll avoid adding "fixed" then. |
Yeah, actually, even though the tests failed, they're failing further along than before, so it's progress! |
LGTM |
Just wanted to update. We're still stuck with figuring out why broadcasting from jails aren't working as intended. This PR will work just fine but the test will still fail [for other reasons]. Not sure we should merge this just yet since it might be avoided by finding another solution in CI-land. |
Thinking we might skip this -- ref nodejs/build#228. |
@jbergstroem ... where are we at on this? |
We still have the issue but are migrating away from jails in ci. I'm inclined to close and reopen if some other freebsd user can help debug (I didn't have access to host). |
Introduce a helper - very similar to
common.localhostIPv4
that allows test runner to override a broadcast address. This is required in certain scenarios - like FreeBSD jails - since networking acts a bit different.Refs: #2472
(I've enabled BROADCAST=$foo on both FreeBSD bots)
/R=@Trott, ?