update tests duo to CRUN#1767 to support both values

Signed-off-by: Tim Zhou <tizhou@redhat.com>
This commit is contained in:
Tim Zhou
2025-08-14 08:29:49 -04:00
committed by Matt Heon
parent f93cad508a
commit dcdaaf24be
3 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ env:
DEBIAN_NAME: "debian-13"
# Image identifiers
IMAGE_SUFFIX: "c20250627t155202z-f42f41d13"
IMAGE_SUFFIX: "c20250812t173301z-f42f41d13"
# EC2 images
FEDORA_AMI: "fedora-aws-${IMAGE_SUFFIX}"

View File

@ -762,14 +762,13 @@ if root && test -e /dev/nullb0; then
t POST libpod/containers/updateCtr/update ${TMPD}/update.json 201
cgroupPath=/sys/fs/cgroup/cpu.weight
# 002 is the byte length
cpu_weight_expect=$'\001\0025'
# Verify CPU weight
echo '{ "AttachStdout":true,"Cmd":["cat", "'$cgroupPath'"]}' >${TMPD}/exec.json
t POST containers/updateCtr/exec ${TMPD}/exec.json 201 .Id~[0-9a-f]\\{64\\}
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='[
{

View File

@ -141,7 +141,8 @@ var _ = Describe("Podman update", func() {
podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/memory.swap.max", "1073741824")
// 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
podmanTest.CheckFileInContainerSubstring(ctrID, "/sys/fs/cgroup/pids.max", "123")