mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00
Add a system test to verify --runtime is preserved
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:

committed by
Matthew Heon

parent
3858fc1d01
commit
1b4933376f
@ -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
|
||||
#########
|
||||
|
Reference in New Issue
Block a user