tests/int: fix "update rt period and runtime" for rootless#3106
Closed
kolyshkin wants to merge 2 commits intoopencontainers:masterfrom
Closed
tests/int: fix "update rt period and runtime" for rootless#3106kolyshkin wants to merge 2 commits intoopencontainers:masterfrom
kolyshkin wants to merge 2 commits intoopencontainers:masterfrom
Conversation
Since commit f09a3e1, the value passed on to read starts with a slash, resulting in the first element of the array to be empty. As a result, the test tries to write to the top-level cgroup, which fails when rootless: > # Writing 1000000 to /sys/fs/cgroup/cpu,cpuacct//cpu.rt_period_us > # /tmp/bats-run-106184/bats.115768.src: line 548: /sys/fs/cgroup/cpu,cpuacct//cpu.rt_period_us: Permission denied To fix, remove the leading slash. An alternative fix would be to do "for ((i = 1;" instead of "i = 0", but that seems less readable. Fixes: f09a3e1 Signed-off-by: Kir Kolyshkin <[email protected]>
Without this, the test case fails with > Writing 1000000 to /sys/fs/cgroup/cpu,cpuacct/runc-cgroups-integration-test/cpu.rt_period_us > /tmp/bats-run-106836/bats.116418.src: line 548: /sys/fs/cgroup/cpu,cpuacct/runc-cgroups-integration-test/cpu.rt_period_us: Permission denied Since we do not currently have a setup to test this, this went unnoticed (can be seen in RHEL8 though). Signed-off-by: Kir Kolyshkin <[email protected]>
Contributor
Author
|
Closing as this is included in #3104 (the second patch in a fixed form) |
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.
Since commit f09a3e1, the value passed on to read starts with
a slash, resulting in the first element of the array to be empty.
As a result, the test tries to write to the top-level cgroup, which
fails when rootless:
To fix, remove the leading slash.
An alternative fix would be to do
for ((i = 1;instead ofi = 0, butthat seems less readable.
Fixes: f09a3e1
Signed-off-by: Kir Kolyshkin [email protected]