@@ -29,9 +29,6 @@ function setup() {
2929 "period": 1000000,
3030 "cpus": "0"
3131 },
32- "blockio": {
33- "weight": 1000
34- },
3532 "pids": {
3633 "limit": 20
3734 },
@@ -70,7 +67,6 @@ function check_cgroup_value() {
7067 CGROUP_SYSTEM_MEMORY=$( grep " cgroup" /proc/self/mountinfo | gawk ' toupper($NF) ~ /\<' MEMORY' \>/ { print $5; exit }' )
7168
7269 # check that initial values were properly set
73- check_cgroup_value $CGROUP_BLKIO " blkio.weight" 1000
7470 check_cgroup_value $CGROUP_CPU " cpu.cfs_period_us" 1000000
7571 check_cgroup_value $CGROUP_CPU " cpu.cfs_quota_us" 500000
7672 check_cgroup_value $CGROUP_CPU " cpu.shares" 100
@@ -81,11 +77,6 @@ function check_cgroup_value() {
8177 check_cgroup_value $CGROUP_MEMORY " memory.soft_limit_in_bytes" 25165824
8278 check_cgroup_value $CGROUP_PIDS " pids.max" 20
8379
84- # update blkio-weight
85- runc update test_update --blkio-weight 500
86- [ " $status " -eq 0 ]
87- check_cgroup_value $CGROUP_BLKIO " blkio.weight" 500
88-
8980 # update cpu-period
9081 runc update test_update --cpu-period 900000
9182 [ " $status " -eq 0 ]
@@ -182,16 +173,12 @@ function check_cgroup_value() {
182173 "period": 1000000,
183174 "cpus": "0"
184175 },
185- "blockIO": {
186- "weight": 1000
187- },
188176 "pids": {
189177 "limit": 20
190178 }
191179}
192180EOF
193181 [ " $status " -eq 0 ]
194- check_cgroup_value $CGROUP_BLKIO " blkio.weight" 1000
195182 check_cgroup_value $CGROUP_CPU " cpu.cfs_period_us" 1000000
196183 check_cgroup_value $CGROUP_CPU " cpu.cfs_quota_us" 500000
197184 check_cgroup_value $CGROUP_CPU " cpu.shares" 100
@@ -203,12 +190,11 @@ EOF
203190 check_cgroup_value $CGROUP_PIDS " pids.max" 20
204191
205192 # redo all the changes at once
206- runc update test_update --blkio-weight 500 \
193+ runc update test_update \
207194 --cpu-period 900000 --cpu-quota 600000 --cpu-share 200 --memory 67108864 \
208195 --memory-reservation 33554432 --kernel-memory 50331648 --kernel-memory-tcp 41943040 \
209196 --pids-limit 10
210197 [ " $status " -eq 0 ]
211- check_cgroup_value $CGROUP_BLKIO " blkio.weight" 500
212198 check_cgroup_value $CGROUP_CPU " cpu.cfs_period_us" 900000
213199 check_cgroup_value $CGROUP_CPU " cpu.cfs_quota_us" 600000
214200 check_cgroup_value $CGROUP_CPU " cpu.shares" 200
233219 "period": 1000000,
234220 "cpus": "0"
235221 },
236- "blockIO": {
237- "weight": 1000
238- },
239222 "pids": {
240223 "limit": 20
241224 }
246229
247230 runc update -r $BATS_TMPDIR /runc-cgroups-integration-test.json test_update
248231 [ " $status " -eq 0 ]
249- check_cgroup_value $CGROUP_BLKIO " blkio.weight" 1000
250232 check_cgroup_value $CGROUP_CPU " cpu.cfs_period_us" 1000000
251233 check_cgroup_value $CGROUP_CPU " cpu.cfs_quota_us" 500000
252234 check_cgroup_value $CGROUP_CPU " cpu.shares" 100
0 commit comments