mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests/int/update: test bad cpu.idle values
Values other than 1 or 0 are ignored by the kernel, see sched_group_set_idle() in kernel/sched/fair.c If the added test case ever fails, it means that the kernel now accepts values other than 0 or 1, and runc needs to adopt to that. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -454,6 +454,17 @@ EOF
|
||||
check_cgroup_value "cpu.idle" "$val"
|
||||
done
|
||||
|
||||
# Values other than 1 or 0 are ignored by the kernel, see
|
||||
# sched_group_set_idle() in kernel/sched/fair.c.
|
||||
#
|
||||
# If this ever fails, it means that the kernel now accepts values
|
||||
# other than 0 or 1, and runc needs to adopt.
|
||||
for val in -1 2 3; do
|
||||
runc update --cpu-idle "$val" test_update
|
||||
[ "$status" -ne 0 ]
|
||||
check_cgroup_value "cpu.idle" "1"
|
||||
done
|
||||
|
||||
# https://github.com/opencontainers/runc/issues/3786
|
||||
[ "$(systemd_version)" -ge 252 ] && return
|
||||
# test update other option won't impact on cpu.idle
|
||||
|
||||
Reference in New Issue
Block a user