summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorCharlie Doern <cdoern@redhat.com>2022-06-28 12:11:29 -0400
committerCharlie Doern <cdoern@redhat.com>2022-07-01 13:44:32 -0400
commitb92149e2a8ce596b2839ec404e2ebd457943848f (patch)
tree1223e8b4594b40413a749c5d0025f5c4a6106f8a /test/system
parentb00e65aa9c071428579a55f91a92f3702765ed85 (diff)
downloadpodman-b92149e2a8ce596b2839ec404e2ebd457943848f.tar.gz
podman-b92149e2a8ce596b2839ec404e2ebd457943848f.tar.bz2
podman-b92149e2a8ce596b2839ec404e2ebd457943848f.zip
podman pod create --memory
using the new resource backend, implement podman pod create --memory which enables users to modify memory.max inside of the parent cgroup (the pod), implicitly impacting all children unless overriden Signed-off-by: Charlie Doern <cdoern@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/200-pod.bats10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats
index 92d3966be..0e522b34d 100644
--- a/test/system/200-pod.bats
+++ b/test/system/200-pod.bats
@@ -479,21 +479,25 @@ spec:
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 --cgroup-manager=systemd pod create --name=$name1 --cpus=5 --memory=10m
+ 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"
+ local actual2=$(< /sys/fs/cgroup/$path1/memory.max)
+ is "$actual2" "10485760" "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 create --cpus=5 --memory=10m --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"
+ local actual2=$(< /sys/fs/cgroup/$path2/memory.max)
+ is "$actual2" "10485760" "resource limits set properly"
run_podman --cgroup-manager=cgroupfs pod rm $name2
}