diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2022-06-27 15:14:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-27 15:14:20 +0000 |
commit | 088665d2cfd488004f34dbd0804c3cd00bf94ca4 (patch) | |
tree | 0aa7d04edc4009672fcc760aca511b8d10796682 /test | |
parent | 8806606ca2e2060750b3f86c6d31bb50125309de (diff) | |
parent | 2792e598c7ce1198ec8464a3119504123ae8397c (diff) | |
download | podman-088665d2cfd488004f34dbd0804c3cd00bf94ca4.tar.gz podman-088665d2cfd488004f34dbd0804c3cd00bf94ca4.tar.bz2 podman-088665d2cfd488004f34dbd0804c3cd00bf94ca4.zip |
Merge pull request #14654 from cdoern/cgroup
podman cgroup enhancement
Diffstat (limited to 'test')
-rw-r--r-- | test/system/200-pod.bats | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats index 404ad67ec..f597c0e0a 100644 --- a/test/system/200-pod.bats +++ b/test/system/200-pod.bats @@ -472,4 +472,30 @@ spec: run_podman pod rm $name-pod } +@test "pod resource limits" { + skip_if_remote "resource limits only implemented on non-remote" + if is_rootless; then + skip "only meaningful for rootful" + fi + + local name1="resources1" + run_podman --cgroup-manager=systemd pod create --name=$name1 --cpus=5 + run_podman --cgroup-manager=systemd pod start $name1 + run_podman pod inspect --format '{{.CgroupPath}}' $name1 + local path1="$output" + local actual1=$(< /sys/fs/cgroup/$path1/cpu.max) + is "$actual1" "500000 100000" "resource limits set properly" + run_podman pod --cgroup-manager=systemd rm -f $name1 + + local name2="resources2" + run_podman --cgroup-manager=cgroupfs pod create --cpus=5 --name=$name2 + run_podman --cgroup-manager=cgroupfs pod start $name2 + run_podman pod inspect --format '{{.CgroupPath}}' $name2 + local path2="$output" + local actual2=$(< /sys/fs/cgroup/$path2/cpu.max) + is "$actual2" "500000 100000" "resource limits set properly" + run_podman --cgroup-manager=cgroupfs pod rm $name2 + +} + # vim: filetype=sh |