-
Notifications
You must be signed in to change notification settings - Fork 355
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
add process rlimits fail test #3051
add process rlimits fail test #3051
Conversation
Signed-off-by: ntkm61027 <131166531+ntkm61027@users.noreply.github.com>
ea48efa
to
90d0a8c
Compare
Hey @ntkm61027 , thanks for the PR! Currently the CI is passing, so the logic in your test seems to be correct, but I don't understand why it is working. |
Signed-off-by: ntkm61027 <131166531+ntkm61027@users.noreply.github.com>
d7163ea
to
a826e17
Compare
@YJDoc2 According to
In our test case:
This approach still tests the OCI spec requirement that "The runtime MUST generate an error for any values which cannot be mapped to a relevant kernel interface", just from a different angle than the original Go test:
I added these implementation details as comments in the code as well. |
Hey @ntkm61027 thanks for the explanation and comments. That makes sense. Thanks for your contribution! |
Signed-off-by: ntkm61027 <131166531+ntkm61027@users.noreply.github.com>
@YJDoc2 I forgot to add the kernel doc link! Just a moment please! |
Signed-off-by: ntkm61027 <131166531+ntkm61027@users.noreply.github.com>
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!
Hey @ntkm61027 thanks for updating with changes. Also, congratulations on your first contribution to Youki! |
Description
Implement integration test for process_rlimits_fail.
Port the test from runtime-tools/validation with a different approach.
While the original test in
runtime-tools/validation/process_rlimits_fail/process_rlimits_fail.go
tests by passing an invalid rlimits type (RLIMIT_TEST
), this implementation takes a different approach since PosixRlimitBuilder uses a strictly typed enum (PosixRlimitType) that prevents invalid types at compile time.Instead, this test validates the error handling by setting extremely high values (
u64::MAX
) for both hard and soft limits, which exceeds system limitations.Type of Change
Testing
Related Issues
related #361 (process_rlimits_fail)