Merge pull request #2510 from kolyshkin/criu-el7

tests/centos7: add criu
This commit is contained in:
Mrunal Patel 2020-07-13 07:51:08 -07:00 committed by GitHub
commit 47fbafb7bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -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
@ -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

View File

@ -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"}]'

View File

@ -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