-
Notifications
You must be signed in to change notification settings - Fork 20k
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
cmd/utils: Add check on hard limit, skip test if below target #15684
Conversation
This will fail building on Windows since file descriptor limits are handled differently there. I think it's fine to reduce the test target from 4K to 2K. That would solve your issue without requiring fancier changes. Alternatively you could add a |
Thanks @karalabe , adjusted. |
cmd/utils/fdlimit_test.go
Outdated
|
||
// TestFileDescriptorLimits simply tests whether the file descriptor allowance | ||
// per this process can be retrieved. | ||
func TestFileDescriptorLimits(t *testing.T) { | ||
target := 4096 | ||
var limit syscall.Rlimit |
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.
Please avoid using the syscall.Rlimit
type here to make the Windows build pass.
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.
argh sorry
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.
LGTM! Will merge when green. Pushed some minor doc additions.
Issue #15683