Install sudo, create test user with ID 1000, install bash,
fix pidfile creation and pidfile chmod.
v2:
* use sleep to give the criu daemon some time to start up
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
For python2/python3 compatibility install additional (python2-future)
and different (python2-ipaddress) packages during test.
Also switch Fedora tests to explicitly install versioned python packages
(python2-* instead of python-*).
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Commit 299e4b4 ("travis: enable ccache for docker/qemu builds") combined
multiple RUN statements in Dockerfiles into a single one, which is good
for performance (as there is an intermediate cache created after each
statement). Unfortunately, it partially did so by combining statements
with use of semicolons, meaning we are ignoring non-zero exit codes.
As a result, failure from make are ignored and Travis builds are all
green.
To fix, replace all occurences of semicolon with &&.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
As we compile-test non-x86_64 architectures under qemu emulation,
it works pretty slow.
Dmitry Safonov suggested, and Andrey Vagin initially implemented
supporting ccache for such builds. This patch is based heavily
on Andrey's work -- all the bugs added are purely mine though.
Performance results: in an ideal environment (two builds of the same
code, one with cold (empty) ccache, another with the hot one)
I saw compile time improvements of 4x to 5x, and total test run time
improvement up to 2x to 2.5x. In layman terms, the complete test run
that was taking more than 50 minutes now takes about 25!
Notes on handling .ccache directory:
1. Before running docker build, .ccache directory (saved in between
runs by Travis) is moved to criu source code root, from where it
is copied by docker together with criu sources.
2. In Dockerfile, .ccache gets moved to /tmp, and CCACHE_DIR
is set accordingly.
3. After running docker build, .ccache is copied out from docker
container back to the host (from where it is saved by Travis).
Ccache envorinment notes:
1. CCACHE_NOCOMPRESS is needed because otherwise tons of time is spent
on compression/decompression (big performance hit under qemu).
2. CCACHE_CPP2 is required with clang, see detailed explanation at
http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html
The logic of setting CCACHE_CPP2 in Dockerfile is somewhat fancy;
unfortunately I was not able to come up with a simpler approach.
Misc:
1. Travis runs "ccache -s" after the build is completed. A call to
"ccache -s" is called to Dockerfile before make, so one can
compare before/after numbers.
2. make invocations are surrounded by "date" calls so one can get the
compilation times.
Changes in v2:
- consolidate Dockerfile statements (ENV, RUN)
- single object make test is no longer commented out
- simplify "make mrproper" test
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
"zdtm.py run -a" doesn't work on Alpine:
find: unrecognized: -executable
So run zdtm/static/env00 for now to be sure that
it is not broken at all.
travis-ci: success for travis: execute tests on Alpine
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
We see the "No space left on device" error on the current version,
so let's try to use a newer version of Alpine, maybe this error
has been fixed there.
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
It will be used to generate tcp packets for restoring half-closed sockets.
travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
With this, one can do a CRUI build via QEMU+Docker using clang
as a compiler, for example:
make -C scripts/build alpine-clang
make -C scripts/build ppc64le-clang
For alpine, default clang version is used. For others, a version has
to be specified explicitly, as there is no package called "clang" in
Ubuntu Trusty (which is used as a base for most arches). Since
clang-3.8 appears to be available from Trusty, and this is the current
stable version of clang, let's use it.
travis-ci: success for QEMU+Dockerfile improvements + clang build
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
I just spent some considerable time trying to figure out the source
of errors like this:
make -C scripts/build ppc64
...
DEP images/autofs.pb-c.d
In file included from images/autofs.pb-c.c:9:0:
images/autofs.pb-c.h:7:35: fatal error: protobuf-c/protobuf-c.h:
No such file or directory
#include <protobuf-c/protobuf-c.h>
^
compilation terminated.
It appears that we copy the complete tree to a docker container, and it
is not cleaned properly before the build. In particular, images/*.pb-c.{c,h}
are not removed/rebuilt. The problem is not noticeable until version of
protobuf-c differs between the host and container, and they use different
include paths (/usr/include/google/protobuf-c/ vs /usr/include/protobuf-c).
As I don't want anyone else to spend so much time figuring this out,
here is the patch.
travis-ci: success for QEMU+Dockerfile improvements + clang build
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
git is needed as the top-level Makefile calls it. Strictly speaking
git is not required to build CRIU, but it's better to have it than
to see some error messages.
coreutils is needed for nproc utility which is called from Dockerfile:
make -j $(nproc)
Before this patch, it was equivalent to "make -j" (plus an error
message) which is not the best thing to do.
travis-ci: success for QEMU+Dockerfile improvements + clang build
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>