Skip to content

Commit

Permalink
Merge pull request opencontainers#2510 from kolyshkin/criu-el7
Browse files Browse the repository at this point in the history
tests/centos7: add criu
  • Loading branch information
Mrunal Patel authored Jul 13, 2020
2 parents cf1273a + 92f4982 commit 47fbafb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Vagrantfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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
Expand All @@ -36,8 +37,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 <<EOF
PATH=/usr/local/go/bin:/usr/local/bin:$PATH
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/checkpoint.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"}]'
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47fbafb

Please sign in to comment.