mirror of
https://github.com/containers/podman.git
synced 2025-10-13 01:06:10 +08:00
update tests duo to CRUN#1767 to support both values
Signed-off-by: Tim Zhou <tizhou@redhat.com>
This commit is contained in:
@ -31,7 +31,7 @@ env:
|
|||||||
DEBIAN_NAME: "debian-13"
|
DEBIAN_NAME: "debian-13"
|
||||||
|
|
||||||
# Image identifiers
|
# Image identifiers
|
||||||
IMAGE_SUFFIX: "c20250627t155202z-f42f41d13"
|
IMAGE_SUFFIX: "c20250812t173301z-f42f41d13"
|
||||||
|
|
||||||
# EC2 images
|
# EC2 images
|
||||||
FEDORA_AMI: "fedora-aws-${IMAGE_SUFFIX}"
|
FEDORA_AMI: "fedora-aws-${IMAGE_SUFFIX}"
|
||||||
|
@ -762,14 +762,13 @@ if root && test -e /dev/nullb0; then
|
|||||||
t POST libpod/containers/updateCtr/update ${TMPD}/update.json 201
|
t POST libpod/containers/updateCtr/update ${TMPD}/update.json 201
|
||||||
|
|
||||||
cgroupPath=/sys/fs/cgroup/cpu.weight
|
cgroupPath=/sys/fs/cgroup/cpu.weight
|
||||||
# 002 is the byte length
|
|
||||||
cpu_weight_expect=$'\001\0025'
|
|
||||||
|
|
||||||
# Verify CPU weight
|
# Verify CPU weight
|
||||||
echo '{ "AttachStdout":true,"Cmd":["cat", "'$cgroupPath'"]}' >${TMPD}/exec.json
|
echo '{ "AttachStdout":true,"Cmd":["cat", "'$cgroupPath'"]}' >${TMPD}/exec.json
|
||||||
t POST containers/updateCtr/exec ${TMPD}/exec.json 201 .Id~[0-9a-f]\\{64\\}
|
t POST containers/updateCtr/exec ${TMPD}/exec.json 201 .Id~[0-9a-f]\\{64\\}
|
||||||
eid=$(jq -r '.Id' <<<"$output")
|
eid=$(jq -r '.Id' <<<"$output")
|
||||||
t POST exec/$eid/start 200 $cpu_weight_expect
|
t POST exec/$eid/start 200
|
||||||
|
like "$(<$WORKDIR/curl.result.out)" $'^\x01.\(20\|5\)$' "cpu.weight is 5 or 20"
|
||||||
|
|
||||||
BlkioDeviceReadBps_expected='[
|
BlkioDeviceReadBps_expected='[
|
||||||
{
|
{
|
||||||
|
@ -141,7 +141,8 @@ var _ = Describe("Podman update", func() {
|
|||||||
podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/memory.swap.max", "1073741824")
|
podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/memory.swap.max", "1073741824")
|
||||||
|
|
||||||
// checking cpu-shares
|
// checking cpu-shares
|
||||||
podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/cpu.weight", "5")
|
exec := podmanTest.PodmanExitCleanly("exec", ctrID, "cat", "/sys/fs/cgroup/cpu.weight")
|
||||||
|
Expect(exec.OutputToString()).To(Or(ContainSubstring("5"), ContainSubstring("20")))
|
||||||
|
|
||||||
// checking pids-limit
|
// checking pids-limit
|
||||||
podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/pids.max", "123")
|
podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/pids.max", "123")
|
||||||
|
Reference in New Issue
Block a user