tests/int/helpers: generalize require cgroups_freezer
With this, something like cgroups_pids can be used (to be added
by the next commit).
@@ -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
