Skip to content

Commit

Permalink
add a test case for runc update cpu burst
Browse files Browse the repository at this point in the history
In issue opencontainers#4210, if we don't privide `--cpu-burst` in `runc update`,
the value of cpu burst will always set to 0.

Signed-off-by: lifubang <[email protected]>
  • Loading branch information
lifubang committed Mar 15, 2024
1 parent 44114d3 commit 0e6fc40
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/integration/update.bats
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,17 @@ EOF
[ "$status" -eq 0 ]
check_cpu_burst 500000

# issue: https://github.com/opencontainers/runc/issues/4210
if [ -v CGROUP_V2 ]; then
runc update test_update --memory 100M
[ "$status" -eq 0 ]
check_cpu_burst 500000
else
runc update test_update --cpu-period 300000
[ "$status" -eq 0 ]
check_cpu_burst 500000
fi

runc update test_update --cpu-period 900000 --cpu-burst 0
[ "$status" -eq 0 ]
check_cpu_burst 0
Expand Down

0 comments on commit 0e6fc40

Please sign in to comment.