summaryrefslogtreecommitdiff
path: root/test/apiv2/test-apiv2
diff options
context:
space:
mode:
Diffstat (limited to 'test/apiv2/test-apiv2')
-rwxr-xr-xtest/apiv2/test-apiv26
1 files changed, 6 insertions, 0 deletions
diff --git a/test/apiv2/test-apiv2 b/test/apiv2/test-apiv2
index bc2ed142c..f0fb4ae34 100755
--- a/test/apiv2/test-apiv2
+++ b/test/apiv2/test-apiv2
@@ -290,6 +290,12 @@ function rootless() {
test "$ROOTLESS" = "true"
}
+# True if cgroups v2 are enabled
+function have_cgroupsv2() {
+ cgroup_type=$(stat -f -c %T /sys/fs/cgroup)
+ test "$cgroup_type" = "cgroup2fs"
+}
+
# END infrastructure code
###############################################################################
# BEGIN sanity checks