#!/bin/bash## kola:## # Check to make sure we are running cgroups v2## exclusive: false## description: Verify the system supports cgroupsv2.## # Abuse creationDate here since we are introducing## # the test running on RHCOS and don't want hard failures## # there if the test needs to be adjusted.## creationDate: 2026-04-16set -xeuo pipefail# shellcheck disable=SC1091. "$KOLA_EXT_DATA/commonlib.sh"# make sure the system is on cgroups v2has_cgroup_karg=1grep -q systemd.unified_cgroup_hierarchy /proc/cmdline || has_cgroup_karg=0sys_fs_cgroup_source=$(findmnt -no SOURCE /sys/fs/cgroup)if [ $has_cgroup_karg == 1 ]; thenfatal "found systemd.unified_cgroup_hierarchy=0"fiif [[ $sys_fs_cgroup_source != cgroup2 ]]; thenfatal "/sys/fs/cgroup is not cgroup2"fi