Skip to content

Commit 47fbafb

Browse files
author
Mrunal Patel
authored
Merge pull request opencontainers#2510 from kolyshkin/criu-el7
tests/centos7: add criu
2 parents cf1273a + 92f4982 commit 47fbafb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Vagrantfile.centos7

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Vagrant.configure("2") do |config|
2020
2121
# install yum packages
2222
yum install -y -q epel-release
23-
yum install -y -q gcc git iptables jq libseccomp-devel make skopeo
23+
(cd /etc/yum.repos.d && curl -O https://copr.fedorainfracloud.org/coprs/adrian/criu-el7/repo/epel-7/adrian-criu-el7-epel-7.repo)
24+
yum install -y -q gcc git iptables jq libseccomp-devel make skopeo criu
2425
yum clean all
2526
2627
# install Go
@@ -36,8 +37,6 @@ Vagrant.configure("2") do |config|
3637
git checkout $BATS_VERSION
3738
./install.sh /usr/local
3839
39-
# NOTE: criu is NOT installed. criu tests are skipped.
40-
4140
# set PATH (NOTE: sudo without -i ignores this PATH)
4241
cat >> /etc/profile.d/sh.local <<EOF
4342
PATH=/usr/local/go/bin:/usr/local/bin:$PATH

tests/integration/checkpoint.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function simple_cr() {
7272

7373
@test "checkpoint and restore (cgroupns)" {
7474
# cgroupv2 already enables cgroupns so this case was tested above already
75-
requires cgroups_v1
75+
requires cgroups_v1 cgroupns
7676

7777
# enable CGROUPNS
7878
update_config '.linux.namespaces += [{"type": "cgroup"}]'

tests/integration/helpers.bash

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,11 @@ function requires() {
286286
skip_me=1
287287
fi
288288
;;
289+
cgroupns)
290+
if [ ! -e "/proc/self/ns/cgroup" ]; then
291+
skip_me=1
292+
fi
293+
;;
289294
cgroups_v1)
290295
init_cgroup_paths
291296
if [ "$CGROUP_UNIFIED" != "no" ]; then

0 commit comments

Comments
 (0)