mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests/int/helpers: generalize require cgroups_freezer
With this, something like cgroups_pids can be used (to be added by the next commit). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -304,12 +304,6 @@ function requires() {
|
||||
skip_me=1
|
||||
fi
|
||||
;;
|
||||
cgroups_freezer)
|
||||
init_cgroup_paths
|
||||
if [[ "$CGROUP_SUBSYSTEMS" != *"freezer"* ]]; then
|
||||
skip_me=1
|
||||
fi
|
||||
;;
|
||||
cgroups_rt)
|
||||
init_cgroup_paths
|
||||
if [ ! -e "${CGROUP_CPU_BASE_PATH}/cpu.rt_period_us" ]; then
|
||||
@@ -339,6 +333,13 @@ function requires() {
|
||||
skip_me=1
|
||||
fi
|
||||
;;
|
||||
cgroups_*)
|
||||
init_cgroup_paths
|
||||
var=${var#cgroups_}
|
||||
if [[ "$CGROUP_SUBSYSTEMS" != *"$var"* ]]; then
|
||||
skip_me=1
|
||||
fi
|
||||
;;
|
||||
smp)
|
||||
local cpu_count=$(grep -c '^processor' /proc/cpuinfo)
|
||||
if [ "$cpu_count" -lt 2 ]; then
|
||||
|
||||
Reference in New Issue
Block a user