summaryrefslogtreecommitdiff
path: root/test/system/helpers.bash
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-20 11:22:43 -0400
committerGitHub <noreply@github.com>2020-10-20 11:22:43 -0400
commit36682115b0f3f5f7cfcc6bc4580e5a7435b9a4d8 (patch)
tree9883d07d47e45ad05b53d1fa626d33b342ba5d5e /test/system/helpers.bash
parent6c0b600e7d49d17db6eedd21b755b5d4f1a15b11 (diff)
parent1b4933376f4e6738ff3a0c42a2e27c6d21c07e7c (diff)
downloadpodman-36682115b0f3f5f7cfcc6bc4580e5a7435b9a4d8.tar.gz
podman-36682115b0f3f5f7cfcc6bc4580e5a7435b9a4d8.tar.bz2
podman-36682115b0f3f5f7cfcc6bc4580e5a7435b9a4d8.zip
Merge pull request #7126 from mheon/fix_missing_ociruntime
Fix missing OCI Runtime
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r--test/system/helpers.bash10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 73cf1e5b2..2cced10c2 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -253,6 +253,7 @@ function is_cgroupsv1() {
! is_cgroupsv2
}
+# True if cgroups v2 are enabled
function is_cgroupsv2() {
cgroup_type=$(stat -f -c %T /sys/fs/cgroup)
test "$cgroup_type" = "cgroup2fs"
@@ -305,6 +306,15 @@ function skip_if_no_selinux() {
fi
}
+#######################
+# skip_if_cgroupsv1 # ...with an optional message
+#######################
+function skip_if_cgroupsv1() {
+ if ! is_cgroupsv2; then
+ skip "${1:-test requires cgroupsv2}"
+ fi
+}
+
#########
# die # Abort with helpful message
#########