From 98c7c01df9d79a6aab0c3e01cdbef22f78ca96d1 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 7 Jul 2020 11:23:44 -0700 Subject: [PATCH 1/2] 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 From 92f498210aece48dd54d2cd1b48d840e5593a9cc Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 7 Jul 2020 11:21:42 -0700 Subject: [PATCH 2/2] tests/centos7: add criu Enable criu tests on centos 7 by using criu from Adrian's repo (https://copr.fedorainfracloud.org/coprs/adrian/criu-el7/) Signed-off-by: Kir Kolyshkin --- Vagrantfile.centos7 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Vagrantfile.centos7 b/Vagrantfile.centos7 index 7342e4ab1..a6cd42c1d 100644 --- a/Vagrantfile.centos7 +++ b/Vagrantfile.centos7 @@ -18,7 +18,8 @@ Vagrant.configure("2") do |config| # install yum packages yum install -y -q epel-release - yum install -y -q gcc git iptables jq libseccomp-devel make skopeo + (cd /etc/yum.repos.d && curl -O https://copr.fedorainfracloud.org/coprs/adrian/criu-el7/repo/epel-7/adrian-criu-el7-epel-7.repo) + yum install -y -q gcc git iptables jq libseccomp-devel make skopeo criu yum clean all # install Go @@ -34,8 +35,6 @@ Vagrant.configure("2") do |config| git checkout $BATS_VERSION ./install.sh /usr/local - # NOTE: criu is NOT installed. criu tests are skipped. - # set PATH (NOTE: sudo without -i ignores this PATH) cat >> /etc/profile.d/sh.local <