summaryrefslogtreecommitdiff
path: root/test/system/helpers.bash
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-09-30 09:55:59 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2021-09-30 13:58:47 +0200
commit788106dad12dd83763bb6ab1f1e4e57c75f73a14 (patch)
treeeae02dc67abbf52069f0375efe3a12c5bf85c866 /test/system/helpers.bash
parentcd10304dca72ef030b64142885518e6dc0d3e4af (diff)
downloadpodman-788106dad12dd83763bb6ab1f1e4e57c75f73a14.tar.gz
podman-788106dad12dd83763bb6ab1f1e4e57c75f73a14.tar.bz2
podman-788106dad12dd83763bb6ab1f1e4e57c75f73a14.zip
test: skip test on rootless cgroupsv1
skip the test "podman selinux: shared context in (some) namespaces" on cgroupsv1 when running as rootless since the tests requires --pid=container:. If the container runtime cannot use cgroupsv1 and the container has no pid namespace. then it is not possible to correctly terminate the container. Without a cgroup or a pid namespace, the runtime has no control on what processes are in the container. Closes: https://github.com/containers/podman/issues/11785 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r--test/system/helpers.bash12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 28ea924bb..666735b0c 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -428,6 +428,18 @@ function skip_if_cgroupsv1() {
fi
}
+######################
+# skip_if_rootless_cgroupsv1 # ...with an optional message
+######################
+function skip_if_rootless_cgroupsv1() {
+ if is_rootless; then
+ if ! is_cgroupsv2; then
+ local msg=$(_add_label_if_missing "$1" "rootless cgroupvs1")
+ skip "${msg:-not supported as rootless under cgroupsv1}"
+ fi
+ fi
+}
+
##################################
# skip_if_journald_unavailable # rhbz#1895105: rootless journald permissions
##################################