travis: run tests with asan

v2: Use the devicemapper storage driver for docker containers to
run more tests. AUFS doesn't support file handles, so a few tests
(e.g. inotify00 can't be run).

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Andrei Vagin 2017-03-30 02:34:01 +03:00
parent 444702c642
commit 70ac7a10cd
5 changed files with 44 additions and 1 deletions

View file

@ -8,6 +8,7 @@ env:
- TR_ARCH=local GCOV=1
- TR_ARCH=local CLANG=1
- TR_ARCH=alpine
- TR_ARCH=asan
- TR_ARCH=x86_64
- TR_ARCH=armv7hf
- TR_ARCH=aarch64

View file

@ -0,0 +1,16 @@
FROM fedora:latest
ARG CC=gcc
ARG ENV1=FOOBAR
RUN dnf install -y git gcc make
RUN dnf install -y protobuf-devel protobuf-c-devel libaio-devel libcap-devel libnl3-devel libnet-devel
RUN dnf install -y python ccache libasan findutils tar python-yaml protobuf-python iptables iproute python-ipaddr procps-ng
COPY . /criu
WORKDIR /criu
ENV CCACHE_DIR=/tmp/.ccache CCACHE_NOCOMPRESS=1 $ENV1=yes
RUN mv .ccache /tmp; make mrproper; ccache -s; \
date; make -j $(nproc) ASAN=1 CC="$CC"; date
RUN make ASAN=1 -C test/zdtm -j $(nproc)

View file

@ -1,6 +1,6 @@
QEMU_ARCHES := armv7hf aarch64 ppc64le # require qemu
ARCHES := $(QEMU_ARCHES) x86_64
TARGETS := $(ARCHES) alpine
TARGETS := $(ARCHES) alpine fedora-asan
TARGETS_CLANG := $(addsuffix $(TARGETS),-clang)
all: $(TARGETS) $(TARGETS_CLANG)

View file

@ -15,6 +15,11 @@ alpine:
$(MAKE) -C ../build $@$(target-suffix)
docker run --rm -it --privileged -v /lib/modules:/lib/modules criu-alpine ./test/zdtm.py run -t zdtm/static/env00
asan:
echo 'DOCKER_OPTS="--storage-driver=devicemapper"' > /etc/default/docker
restart docker
$(MAKE) -C ../build fedora-asan
docker run --rm -it --privileged -v /lib/modules:/lib/modules criu-fedora-asan ./scripts/travis/asan.sh
%:
$(MAKE) -C ../build $@$(target-suffix)

21
scripts/travis/asan.sh Executable file
View file

@ -0,0 +1,21 @@
#!/bin/sh
set -x
cat /proc/self/mountinfo
chmod 0777 test
chmod 0777 test/zdtm/transition/
chmod 0777 test/zdtm/static
./test/zdtm.py run -a --keep-going -k always --parallel 4 -x zdtm/static/rtc
ret=$?
for i in `find / -name 'asan.log*'`; do
echo $i;
echo ========================================
cat $i;
echo ========================================
ret=1;
done;
exit $ret