You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the docker container tests (container_system_mon_test.go) just test monitoring specific processes by calling sleep 30. #136 has reviled that it's really easy to break path traversal when fetching cgroup metrics. To test for this, we should come up with a test that does something kind of stupid, like create a process and add it to a new cgroup like /sys/fs/cgroup/testgroup/test.slice/test.service/test.scope/othertest.scope/. This will result in an equally dumb entry in /proc/pid/cgroups. If the code can properly handle that, it's probably fine. Making this a separate issue, since running this test across a variety of buildkite images will be a bit of a pain, since we need to support cgroups v1 and v2.
At least with v2 this is fairly easy, just mkdir /sys/fs/cgroup/whatever/path/we/want then move the PID to the cgroup via echo.
The text was updated successfully, but these errors were encountered:
fearful-symmetry
changed the title
expand docker integration tests to run against nested cgroups
expand docker integration tests to run against deeply nested cgroup hierarchies.
Apr 23, 2024
Right now, the docker container tests (
container_system_mon_test.go
) just test monitoring specific processes by callingsleep 30
. #136 has reviled that it's really easy to break path traversal when fetching cgroup metrics. To test for this, we should come up with a test that does something kind of stupid, like create a process and add it to a new cgroup like/sys/fs/cgroup/testgroup/test.slice/test.service/test.scope/othertest.scope/
. This will result in an equally dumb entry in/proc/pid/cgroups
. If the code can properly handle that, it's probably fine. Making this a separate issue, since running this test across a variety of buildkite images will be a bit of a pain, since we need to support cgroups v1 and v2.At least with v2 this is fairly easy, just
mkdir /sys/fs/cgroup/whatever/path/we/want
then move the PID to the cgroup viaecho
.The text was updated successfully, but these errors were encountered: