Conversation
The "update cpuset parameters via resources.CPU" test uses "CPU", "Cpus", and "Mems" keys in linux.resources in config.json, and in the input for runc update -r. The OCI runtime spec uses "cpu", "cpus", and "mems" keys. The test only works because Go's encoding/json matches keys case-insensitively, which is not the case for other OCI runtimes, such as crun, when running runc's integration tests against those. Use the proper keys. Since the CPU resources are already set by setup(), merge the new values into them (which is what effectively happened with the old keys, too). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "update cpuset parameters via resources.CPU" test uses
CPU,Cpus, andMemskeys inlinux.resources(inconfig.json, and in the input forrunc update -r), while the OCI runtime spec usescpu,cpus, andmems.The test only works because Go's
encoding/jsonmatches keys case-insensitively. This is not the case for other OCI runtimes, e.g. crun, when running runc's integration tests against them (as crun CI now does).Use the proper keys. Since the CPU resources are already set by
setup(), merge the new values into them, which is effectively what happened with the old keys, too.Tested with both runc and crun (rootless, systemd cgroup driver).