Commit c1e68a94 authored by Andrei Vagin's avatar Andrei Vagin

travis: check docker checkpoint

Install the last version of Docker, start a container and C/R it a few times.
parent 832dfed7
......@@ -18,6 +18,10 @@ env:
- TR_ARCH=aarch64 CLANG=1
- TR_ARCH=ppc64le CLANG=1
- TR_ARCH=alpine CLANG=1
- TR_ARCH=docker-test
matrix:
allow_failures:
- env: TR_ARCH=docker-test
script:
- sudo make CCACHE=1 -C scripts/travis $TR_ARCH
after_success:
......
......@@ -21,5 +21,8 @@ asan:
$(MAKE) -C ../build fedora-asan
docker run --rm -it --privileged -v /lib/modules:/lib/modules criu-fedora-asan ./scripts/travis/asan.sh
docker-test:
./docker-test.sh
%:
$(MAKE) -C ../build $@$(target-suffix)
#!/bin/bash
set -x -e -o pipefail
apt-get install -qq \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get update -qq
apt-get install -qq docker-ce
cat > /etc/docker/daemon.json <<EOF
{
"experimental": true
}
EOF
service docker restart
export SKIP_TRAVIS_TEST=1
./travis-tests
cd ../../
touch /usr/sbin/criu
mount --bind criu/criu /usr/sbin/criu
docker info
criu --version
docker run --security-opt=seccomp:unconfined --name cr -d alpine /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
sleep 1
for i in `seq 50`; do
# docker start returns 0 silently if a container is already started
# docker checkpoint doesn't wait when docker updates a container state
# Due to both these points, we need to sleep after docker checkpoint to
# avoid races with docker start.
docker exec cr ps axf &&
docker checkpoint create cr checkpoint$i &&
sleep 1 &&
docker start --checkpoint checkpoint$i cr 2>&1 | tee log || {
cat "`cat log | grep 'log file:' | sed 's/log file:\s*//'`" || true
docker logs cr || true
cat /tmp/zdtm-core-* || true
dmesg
docker ps
exit 1
}
docker ps
sleep 1
done
......@@ -48,6 +48,9 @@ echo "|`pwd`/test/abrt.sh %P %p %s %e" > /proc/sys/kernel/core_pattern
export GCOV
time make CC="$CC" -j4
[ -n "$SKIP_TRAVIS_TEST" ] && return
time make CC="$CC" -j4 -C test/zdtm
[ -f "$CCACHE_LOGFILE" ] && cat $CCACHE_LOGFILE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment