From 98c7c01df9d79a6aab0c3e01cdbef22f78ca96d1 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 7 Jul 2020 11:23:44 -0700 Subject: [PATCH] tests/int/checkpoint: require cgroupns Otherwise the test will fail on e.g. CentOS 7. Signed-off-by: Kir Kolyshkin --- tests/integration/checkpoint.bats | 2 +- tests/integration/helpers.bash | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/integration/checkpoint.bats b/tests/integration/checkpoint.bats index 00947427c..052ce6675 100644 --- a/tests/integration/checkpoint.bats +++ b/tests/integration/checkpoint.bats @@ -72,7 +72,7 @@ function simple_cr() { @test "checkpoint and restore (cgroupns)" { # cgroupv2 already enables cgroupns so this case was tested above already - requires cgroups_v1 + requires cgroups_v1 cgroupns # enable CGROUPNS update_config '.linux.namespaces += [{"type": "cgroup"}]' diff --git a/tests/integration/helpers.bash b/tests/integration/helpers.bash index b62b6ba49..62e2a464c 100644 --- a/tests/integration/helpers.bash +++ b/tests/integration/helpers.bash @@ -286,6 +286,11 @@ function requires() { skip_me=1 fi ;; + cgroupns) + if [ ! -e "/proc/self/ns/cgroup" ]; then + skip_me=1 + fi + ;; cgroups_v1) init_cgroup_paths if [ "$CGROUP_UNIFIED" != "no" ]; then