diff --git a/tests/integration/helpers.bash b/tests/integration/helpers.bash index e1d2a80af..4702d9714 100755 --- a/tests/integration/helpers.bash +++ b/tests/integration/helpers.bash @@ -121,7 +121,7 @@ function init_cgroup_paths() { CGROUP_BASE_PATH=/sys/fs/cgroup # Find any cgroup.freeze files... - if [ -n "$(find "$CGROUP_BASE_PATH" -type f -name "cgroup.freeze" -print -quit)" ]; then + if [ -n "$(find "$CGROUP_BASE_PATH" -maxdepth 2 -type f -name "cgroup.freeze" -print -quit)" ]; then CGROUP_SUBSYSTEMS+=" freezer" fi else @@ -460,7 +460,7 @@ function requires() { init_cgroup_paths [ -v CGROUP_V1 ] && p="$CGROUP_CPU_BASE_PATH" [ -v CGROUP_V2 ] && p="$CGROUP_BASE_PATH" - if [ -z "$(find "$p" -name cpu.idle -print -quit)" ]; then + if [ -z "$(find "$p" -maxdepth 2 -type f -name cpu.idle -print -quit)" ]; then skip_me=1 fi ;; @@ -476,7 +476,7 @@ function requires() { p="$CGROUP_BASE_PATH" f="cpu.max.burst" fi - if [ -z "$(find "$p" -name "$f" -print -quit)" ]; then + if [ -z "$(find "$p" -maxdepth 2 -type f -name "$f" -print -quit)" ]; then skip_me=1 fi ;;