2016-02-23 03:23:00 +03:00
|
|
|
#!/bin/sh
|
|
|
|
set -x -e
|
|
|
|
|
2016-10-19 10:34:00 +03:00
|
|
|
TRAVIS_PKGS="protobuf-c-compiler libprotobuf-c0-dev libaio-dev
|
|
|
|
libprotobuf-dev protobuf-compiler python-ipaddr libcap-dev
|
2017-05-31 23:23:40 +03:00
|
|
|
libnl-3-dev gcc-multilib gdb bash python-protobuf
|
2017-05-17 12:32:40 -07:00
|
|
|
libnet-dev util-linux asciidoc xmlto"
|
2016-10-19 10:34:00 +03:00
|
|
|
|
2016-10-08 17:22:00 +03:00
|
|
|
travis_prep () {
|
|
|
|
[ -n "$SKIP_TRAVIS_PREP" ] && return
|
|
|
|
|
|
|
|
cd ../../
|
|
|
|
|
|
|
|
service apport stop
|
2016-08-24 23:09:00 +03:00
|
|
|
|
2017-03-15 16:17:22 -07:00
|
|
|
CC=gcc
|
|
|
|
# clang support
|
|
|
|
if [ "$CLANG" = "1" ]; then
|
|
|
|
TRAVIS_PKGS="$TRAVIS_PKGS clang"
|
|
|
|
CC=clang
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ccache support, only enable for non-GCOV case
|
|
|
|
if [ "$CCACHE" = "1" -a -z "$GCOV" ]; then
|
|
|
|
# ccache is installed by default, need to set it up
|
|
|
|
export CCACHE_DIR=$HOME/.ccache
|
|
|
|
[ "$CC" = "clang" ] && export CCACHE_CPP2=yes
|
|
|
|
# uncomment the following to get detailed ccache logs
|
|
|
|
#export CCACHE_LOGFILE=$HOME/ccache.log
|
|
|
|
CC="ccache $CC"
|
|
|
|
fi
|
|
|
|
|
2017-08-24 11:13:05 +03:00
|
|
|
# The /etc/apt/sources.list in the current trusty image for ppc64le is
|
|
|
|
# broken and needs to be fixed
|
|
|
|
if [ "$TR_ARCH" = "ppc64le" ] ; then
|
|
|
|
sed -i '/security/ d' /etc/apt/sources.list
|
|
|
|
fi
|
|
|
|
|
2016-10-08 17:22:00 +03:00
|
|
|
apt-get update -qq
|
2017-05-17 12:32:40 -07:00
|
|
|
apt-get install -qq --no-install-recommends $TRAVIS_PKGS
|
2017-09-30 04:33:57 +03:00
|
|
|
pip install junit-xml
|
2016-10-08 17:22:00 +03:00
|
|
|
chmod a+x $HOME
|
|
|
|
}
|
2016-02-23 03:23:00 +03:00
|
|
|
|
2016-10-08 17:22:00 +03:00
|
|
|
travis_prep
|
|
|
|
|
|
|
|
ulimit -c unlimited
|
2016-08-24 23:09:00 +03:00
|
|
|
echo "|`pwd`/test/abrt.sh %P %p %s %e" > /proc/sys/kernel/core_pattern
|
|
|
|
|
2016-10-11 18:46:59 -07:00
|
|
|
export GCOV
|
2017-03-15 16:17:22 -07:00
|
|
|
time make CC="$CC" -j4
|
2017-10-05 20:38:24 +03:00
|
|
|
|
|
|
|
[ -n "$SKIP_TRAVIS_TEST" ] && return
|
|
|
|
|
2017-03-15 16:17:22 -07:00
|
|
|
time make CC="$CC" -j4 -C test/zdtm
|
|
|
|
|
|
|
|
[ -f "$CCACHE_LOGFILE" ] && cat $CCACHE_LOGFILE
|
2016-07-06 05:01:59 +03:00
|
|
|
|
2017-10-04 09:43:04 +03:00
|
|
|
# umask has to be called before a first criu run, so that .gcda (coverage data)
|
|
|
|
# files are created with read-write permissions for all.
|
|
|
|
umask 0000
|
2016-07-06 05:01:59 +03:00
|
|
|
./criu/criu check
|
|
|
|
./criu/criu check --all || echo $?
|
|
|
|
./criu/criu cpuinfo dump
|
|
|
|
./criu/criu cpuinfo check
|
|
|
|
|
|
|
|
export SKIP_PREP=1
|
2017-05-17 12:32:41 -07:00
|
|
|
# The 3.19 kernel (from Ubuntu 14.04) has a bug. When /proc/PID/pagemap
|
|
|
|
# is read for a few VMAs in one read call, incorrect data is returned.
|
|
|
|
# See https://github.com/xemul/criu/issues/207
|
|
|
|
# Kernel 4.4 (from Ubuntu 14.04.5 update) fixes this.
|
|
|
|
uname -r | grep -q ^3\.19 && export CRIU_PMC_OFF=1
|
2016-07-06 05:01:59 +03:00
|
|
|
|
2016-08-31 22:50:00 +03:00
|
|
|
chmod 0777 test/
|
|
|
|
chmod 0777 test/zdtm/static
|
|
|
|
chmod 0777 test/zdtm/transition
|
|
|
|
|
2016-10-27 02:35:00 +03:00
|
|
|
./test/zdtm.py run -a -p 2
|
2017-05-31 12:51:41 +03:00
|
|
|
|
|
|
|
KERN_MAJ=`uname -r | cut -d. -f1`
|
|
|
|
KERN_MIN=`uname -r | cut -d. -f2`
|
|
|
|
if [ $KERN_MAJ -ge "4" ] && [ $KERN_MIN -ge "11" ]; then
|
|
|
|
LAZY_EXCLUDE="-x cmdlinenv00"
|
|
|
|
else
|
|
|
|
LAZY_EXCLUDE="-x maps007 -x fork -x fork2 -x uffd-events -x cgroupns
|
|
|
|
-x socket_listen -x socket_listen6 -x cmdlinenv00
|
2017-10-15 09:16:40 +03:00
|
|
|
-x socket_close_data01 -x file_read -x lazy-thp"
|
2017-05-31 12:51:41 +03:00
|
|
|
fi
|
2017-10-08 16:19:40 +03:00
|
|
|
LAZY_EXCLUDE="$LAZY_EXCLUDE -x maps04"
|
|
|
|
|
|
|
|
LAZY_TESTS=.*\(maps0\|uffd-events\|lazy-thp\|futex\|fork\).*
|
|
|
|
|
|
|
|
./test/zdtm.py run -p 2 -T $LAZY_TESTS --lazy-pages $LAZY_EXCLUDE
|
|
|
|
./test/zdtm.py run -p 2 -T $LAZY_TESTS --remote-lazy-pages $LAZY_EXCLUDE
|
2016-07-06 05:01:59 +03:00
|
|
|
|
|
|
|
bash ./test/jenkins/criu-fault.sh
|
|
|
|
bash ./test/jenkins/criu-fcg.sh
|
|
|
|
bash ./test/jenkins/criu-inhfd.sh
|
|
|
|
|
|
|
|
make -C test/others/mnt-ext-dev/ run
|
2016-09-28 01:12:19 +03:00
|
|
|
#make -C test/others/exec/ run
|
2017-02-27 22:58:35 -08:00
|
|
|
make -C test/others/make/ run
|
2016-07-06 05:01:59 +03:00
|
|
|
|
|
|
|
./test/zdtm.py run -t zdtm/static/env00 --sibling
|
|
|
|
|
|
|
|
./test/zdtm.py run -t zdtm/transition/maps007 --pre 2 --dedup
|
2016-09-02 00:12:00 +03:00
|
|
|
./test/zdtm.py run -t zdtm/transition/maps007 --pre 2 --noauto-dedup
|
2016-07-06 05:01:59 +03:00
|
|
|
./test/zdtm.py run -t zdtm/transition/maps007 --pre 2 --page-server
|
2016-09-02 00:12:00 +03:00
|
|
|
./test/zdtm.py run -t zdtm/transition/maps007 --pre 2 --page-server --dedup
|
2016-07-06 05:01:59 +03:00
|
|
|
|
|
|
|
./test/zdtm.py run -t zdtm/static/socket-tcp-local --norst
|
|
|
|
|
|
|
|
ip net add test
|
|
|
|
./test/zdtm.py run -t zdtm/static/env00 -f h --join-ns
|
2016-06-03 05:33:00 +03:00
|
|
|
|
2016-11-08 07:38:38 +03:00
|
|
|
# RPC testing
|
|
|
|
./test/zdtm.py run -t zdtm/static/env00 --rpc # Basic
|
|
|
|
./test/zdtm.py run -t zdtm/static/ptrace_sig -f h --rpc # Error handling (crfail test)
|
|
|
|
|
2017-05-04 23:27:47 +03:00
|
|
|
./test/zdtm.py run --empty-ns -T zdtm/static/socket-tcp*-local --iter 2
|
|
|
|
|
2016-06-03 05:33:00 +03:00
|
|
|
pip install flake8
|
|
|
|
make lint
|
2016-08-30 16:58:18 -07:00
|
|
|
|
|
|
|
# Check that help output fits into 80 columns
|
|
|
|
WIDTH=$(./criu/criu --help | wc --max-line-length)
|
|
|
|
if [ "$WIDTH" -gt 80 ]; then
|
|
|
|
echo "criu --help output does not obey 80 characters line width!"
|
|
|
|
exit 1
|
|
|
|
fi
|