-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fixed tests of raised fd limits #5496
Conversation
Fails to cross-compile to FreeBSD: https://ci.ipfs.team/blue/organizations/jenkins/IPFS%2Fgo-ipfs/detail/PR-5496/3/pipeline/123 |
Thanks @magik6k . I pushed a new set of commits with the bug fixed, and an extra commit which adds FreeBSD compilation to the Would still like someone to review the FreeBSD code. I've just amended it to make it compile, but would like someone more knowledgeable to check the integer handling. |
Sharness still fails, should be easy fix: https://ci.ipfs.team/blue/organizations/jenkins/IPFS%2Fgo-ipfs/detail/PR-5496/5/tests
|
@@ -20,6 +20,8 @@ SUPPORTED_PLATFORMS += linux-amd64 | |||
SUPPORTED_PLATFORMS += darwin-386 | |||
SUPPORTED_PLATFORMS += darwin-amd64 | |||
|
|||
SUPPORTED_PLATFORMS += freebsd-amd64 |
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.
👍 I believe we didn't have this before due to some reuseport issues (like usual...).
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.
Thanks for commenting. I'm not sure how this relates to reuseport though. This just directs make test
to see whether it can compile a binary for FreeBSD.
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.
IIRC, compiling on FreeBSD was broken at the time these tests were added.
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.
1 nitpick, otherwise looks good.
(can't get my freebsd vm to boot, so I'm going to assume this will work)
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.
Two nits then LGTM.
Raising FD limits was erroring when the OS's max was at the maximum signed integer value. Switched the code to using uint64 instead of int64. fixed #5495 License: MIT Signed-off-by: Rob Deutsch <rdeutschob@gmail.com>
Moved the fmt.Printf call from ManageFdLimit() to the calling code. ManageFdLimit() is called by tests and its annoying to have it output text License: MIT Signed-off-by: Rob Deutsch <rdeutschob@gmail.com>
License: MIT Signed-off-by: Rob Deutsch <rdeutschob@gmail.com>
Correct me if I'm wrong, but I think the code is clean and its failed due to intermittent Travis CI issues, right? |
(yes). Thanks! |
Raising FD limits was erroring when the OS's max was at the maximum signed integer value. Switched the code to using uint64 instead of int64.
Could someone please review, in particular, the FreeBSD parts? Integer checks are not my forte, and I don't have a FreeBSD machine to test on.
fixed #5495
Bonus: The
ManageFdLimit()
function contained afmt.Print
statement. That's really annoying because it was printing during tests. I've changed theManageFdLimit()
function so that it returns the new limit, and the calling function can do the fmt.Print statement (if it wishes).