-
Notifications
You must be signed in to change notification settings - Fork 144
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
validation: add more values for rlimits test #623
Conversation
validation/process_rlimits.go
Outdated
g.AddProcessRlimits("RLIMIT_CPU", 1024, 1024) | ||
g.AddProcessRlimits("RLIMIT_DATA", 1024, 1024) | ||
g.AddProcessRlimits("RLIMIT_FSIZE", 1024, 1024) | ||
g.AddProcessRlimits("RLIMIT_STACK", 1024, 1024) |
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.
Could we use different values for each of the limits? So that it would check if the runtime does not mix them.
Ditto between the soft and hard value.
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.
updated.
@@ -17,7 +17,12 @@ func main() { | |||
if err != nil { | |||
util.Fatal(err) | |||
} | |||
g.AddProcessRlimits("RLIMIT_NOFILE", 1024, 1024) |
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.
RLIMIT_NOFILE
is also in POSIX, so I don't think we want to drop this one. I'm in favor of adding the others.
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.
It has been added by GetDefaultGenerator().
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.
However the default generator uses the same value 1024 for the soft and hard value.
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.
updated, I add RLIMIT_NOFILE
and use different value.
validation/process_rlimits.go
Outdated
@@ -17,7 +17,12 @@ func main() { | |||
if err != nil { | |||
util.Fatal(err) | |||
} | |||
g.AddProcessRlimits("RLIMIT_NOFILE", 1024, 1024) | |||
g.AddProcessRlimits("RLIMIT_AS", 100, 200) |
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.
This is not many bytes ;). Does it even run? Similarly for RLIMIT_DATA
, RLIMIT_FSIZE
, and RLIMIT_STACK
below. I don't see a problem with making these generous values in the 1GB range, as long as they're distinct values.
I'd prefer different values both for soft & hard limits, and between the different kinds of limits. I tried the following:
And it works with
|
Test all getrlimit(3) values. Signed-off-by: Zhou Hao <[email protected]>
@alban updated, thanks for your suggestion. |
Test all getrlimit(3) values.
Signed-off-by: Zhou Hao [email protected]