-
Notifications
You must be signed in to change notification settings - Fork 348
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 a relative_network_cgroups test as one of the integration tests #2986
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: moz-sec <[email protected]>
4696ba0
to
b332eb0
Compare
Hey, thanks for the PR :) |
test_outside_container(spec, &|data| { | ||
test_result!(check_container_created(&data)); | ||
TestResult::Passed | ||
}) |
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.
Hey, here along with checking if the container is created, we also need validation for the created network cgroup resources - In the original test we call this function which does the validation, so need that here as well.
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.
Thank you.
Added validation for the created network cgroup resources.
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.
Hey, I don't think it is fixed yet. Let me clarify in case there is any confusion -
- In the original go test, at line https://github.com/opencontainers/runtime-tools/blob/master/validation/linux_cgroups_relative_network/linux_cgroups_relative_network.go#L24C1-L24C77, in the
test_outside_container
, they are passingutil.ValidateLinuxResourcesNetwork
function, which will do the validation that ok, the runtime has actually setup the relative network correctly. - The
util.ValidateLinuxResourcesNetwork
function defined at https://github.com/opencontainers/runtime-tools/blob/master/validation/util/linux_resources_network.go#L12 does the checking and validation of relative network cgroup. - The change you did in the last commit you pushed is actually almost a no-op. The original way of just calling the
test_outside_container
was correct, but also needs the cgroup checking logic as mentioned above.
Signed-off-by: moz-sec <[email protected]>
This implements the relative_network_cgroups validation in #361 .
I wrote it based on linux_cgroups_relative_network.go from
opencontainers/runtime-tools
and tests/cgroups/network.rs fromyouki-dev/youki
.