tests/int/checkpoint: require cgroupns

Otherwise the test will fail on e.g. CentOS 7.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2020-07-07 11:23:44 -07:00
parent 819fcc687e
commit 98c7c01df9
2 changed files with 6 additions and 1 deletions

View File

@ -72,7 +72,7 @@ function simple_cr() {
@test "checkpoint and restore (cgroupns)" { @test "checkpoint and restore (cgroupns)" {
# cgroupv2 already enables cgroupns so this case was tested above already # cgroupv2 already enables cgroupns so this case was tested above already
requires cgroups_v1 requires cgroups_v1 cgroupns
# enable CGROUPNS # enable CGROUPNS
update_config '.linux.namespaces += [{"type": "cgroup"}]' update_config '.linux.namespaces += [{"type": "cgroup"}]'

View File

@ -286,6 +286,11 @@ function requires() {
skip_me=1 skip_me=1
fi fi
;; ;;
cgroupns)
if [ ! -e "/proc/self/ns/cgroup" ]; then
skip_me=1
fi
;;
cgroups_v1) cgroups_v1)
init_cgroup_paths init_cgroup_paths
if [ "$CGROUP_UNIFIED" != "no" ]; then if [ "$CGROUP_UNIFIED" != "no" ]; then