From 44fcbfd68f4064d453bb08c86caba19f6b2e8ad0 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 6 May 2021 17:32:27 -0700 Subject: [PATCH] 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 --- tests/integration/helpers.bash | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/integration/helpers.bash b/tests/integration/helpers.bash index c5148f348..d099acae2 100644 --- a/tests/integration/helpers.bash +++ b/tests/integration/helpers.bash @@ -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