-
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
The --ulimit
option now also accepts the name with an RLIMIT_
prefix both upper and lower case.
#18078
Conversation
1437adf
to
6dee301
Compare
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 the PR, I just have a small nit for the test error reporting.
pkg/specgenutil/specgenutil_test.go
Outdated
assert.NotNil(t, err, "err is not nil") | ||
|
||
_, err = GenRlimits([]string{"RLIMIT_FOO=1:1"}) | ||
assert.NotNil(t, err, "err is not nil") | ||
|
||
_, err = GenRlimits([]string{"nofile"}) | ||
assert.NotNil(t, err, "err is not nil") | ||
|
||
_, err = GenRlimits([]string{"nofile=bar"}) | ||
assert.NotNil(t, err, "err is not nil") | ||
|
||
_, err = GenRlimits([]string{"nofile=bar:buzz"}) | ||
assert.NotNil(t, err, "err is not nil") |
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.
consider using assert.Error() for these, this will provide a much friendlier error message in case of an failure
pkg/specgenutil/specgenutil_test.go
Outdated
} | ||
|
||
parsedLimits, err := GenRlimits(lowerCaseLimits) | ||
assert.Nil(t, err, "err is nil") |
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.
here as well, use assert.NoError()
pkg/specgenutil/specgenutil_test.go
Outdated
} | ||
|
||
parsedLimits, err = GenRlimits(upperCaseLimitsWithPrefix) | ||
assert.Nil(t, err, "err is nil") |
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.
same here
You also need to fix the linting error, make sure to run gofmt on the file. |
Also consider adding a proper release note entry to your PR description, how about?
|
Sorry for the stupid question. Maybe you can help me with the local linter? I have tried |
--ulimit
option now also accepts the name with an RLIMIT_
prefix both upper and lower case.
|
I've got a long list of errors https://pastebin.com/7WNY5GCy
|
Oh yeah ignore the typecheck errors, I never figured out why or when it happens but I have seen these before. |
…upper and lower case Signed-off-by: Alexander Gryanko <[email protected]>
@Luap99 looks like I need more help. I'm trying to reproduce failed check in the qemu environment. |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, xpahos 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 |
/lgtm |
/hold cancel |
RLIMIT_* resources constants are converted to the proper format for the go-units module.
Fixes #18077
Does this PR introduce a user-facing change?
None
Signed-off-by: Alexander Gryanko [email protected]