2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 05:18:00 +00:00

145 Commits

Author SHA1 Message Date
Adrian Reber
596276a9af travis: use Fedora rawhide images from Fedora
The docker hub container registry is not updated as fast as Fedora's
registry at registry.fedoraproject.org. Fedora's registry gets a new
image whenever there is a new version of rawhide, docker hub's rawhide
image can take a couple of weeks because the process is not automated.

Especially when Fedora branches of a new release we see lot's of errors
in CRIU's Fedora rawhide based Travis runs. Switch to Fedora's registry
to always have the newest rawhide images for our tests.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-10-20 00:18:24 -07:00
Guoyun Sun
b5c34c74c5 mips:support docker-cross compile
Signed-off-by: Guoyun Sun <sunguoyun@loongson.cn>
2020-10-20 00:18:24 -07:00
Adrian Reber
d23d1fc0f9 travis: fix alpine builds
With the latest version of the alpine container image it seems that
alpine changed a few package names. This adapts the alpine container
to solve the travis failures.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-06-06 11:45:21 -07:00
Mike Rapoport
c3ad4942d4 travis: add ppc64-cross test on amd64
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
2020-03-27 19:36:20 +03:00
Dmitry Safonov
1f74f8d770 travis: Use debian/buster as base for cross build tests
Jessie is called 'oldoldstable', migrate to Buster.

Suggested-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
2020-03-27 19:36:20 +03:00
Dmitry Safonov
18ac1540c4 travis: Add aarch64-cross test on amd64
Fixes: #924
Signed-off-by: Dmitry Safonov <dima@arista.com>
2020-03-27 19:36:20 +03:00
Nidhi Gupta
0c218746d5 Switch open-j9 alpine tests to python3
Signed-off-by: Nidhi Gupta <itsnidhi16@gmail.com>
2020-02-04 12:39:44 -08:00
Nidhi Gupta
1e9ff2aa03 Add Socket-based Java Functional Tests
Signed-off-by: Nidhi Gupta <itsnidhi16@gmail.com>
2020-02-04 12:39:44 -08:00
Adrian Reber
8b5dea33f6 travis: switch alpine to python3
Now that Python 2 has officially reached its end of life also switch the
Alpine based test to Python 3.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-02-04 12:39:44 -08:00
Alexander Mikhalitsyn
acb42456dc zdtm: nft tables preservation test
Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
Signed-off-by: Alexander Mikhalitsyn <alexander@mihalicyn.com>
[Added test_author to zdtm test]
Signed-off-by: Dmitry Safonov <dima@arista.com>
2020-02-04 12:39:43 -08:00
Alexander Mikhalitsyn
e1c4871759 net: add nftables c/r
After Centos-8 nft used instead of iptables. But we had never supported nft rules in
CRIU, and after c/r all rules are flushed.

Co-developed-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
Signed-off-by: Alexander Mikhalitsyn <alexander@mihalicyn.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
2020-02-04 12:39:43 -08:00
Radostin Stoyanov
00bb068785 scripts: alpine: Install py2 packages with pip
The py-future package has been renamed to py3-future [1] and py2 package
for yaml has been dropped [2].

[1] https://git.alpinelinux.org/aports/commit/main?id=316d44abaed13964e97eb43c095cd1b64e3943ad
[2] https://git.alpinelinux.org/aports/commit/main?id=e369c1fd7707a73f2c3e2b11b613198d9a4106de

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2020-02-04 12:39:05 -08:00
Dmitry Safonov
1dbc835954 travis: Add armv7-cross as cross-compile test
Fixes: #455
Based-on-patch-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-02-04 12:39:04 -08:00
Adrian Reber
fe668075ad travis: switch pcp64le and s390x to real hardware
Now that Travis also supports ppc64le and s390x we can remove all qemu
based docker emulation from our test setup. This now runs ppc64le and
s390x tests on real hardware (LXD containers).

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-02-04 12:39:04 -08:00
Adrian Reber
eab8cf0775 travis: switch all arm related tests to real hardware
This switches all arm related tests (32bit and 64bit) to the aarch64
systems Travis provides. For arm32 we are running in a armv7hf container
on aarch64 with 'setarch linux32'.

The main changes are that docker on Travis aarch64 cannot use
'--privileged' as Travis is using unprivileged LXD containers to setup
the testing environment.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-02-04 12:39:04 -08:00
Nidhi Gupta
2b4e653361 Run java functional tests on travis
Signed-off-by: Nidhi Gupta <itsnidhi16@gmail.com>
2020-02-04 12:39:04 -08:00
Adrian Reber
a7c625938e travis: start to use aarch64 hardware
With the newly introduced aarch64 at Travis it is possible for the CRIU
test-cases to switch to aarch64.

Travis uses unprivileged LXD containers on aarch64 which blocks many of
the kernel interfaces CRIU needs. So for now this only tests building
CRIU natively on aarch64 instead of using the Docker+QEMU combination.

All tests based on Docker are not working on aarch64 is there currently
seems to be a problem with Docker on aarch64. Maybe because of the
nesting of Docker in LXD.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-02-04 12:39:04 -08:00
Radostin Stoyanov
4f24786b36 travis: Install missing diffutils dependency
The following tests fail in Fedora rawhide because /usr/bin/diff
is missing.

 * zdtm/static/bridge(ns)
 * zdtm/static/cr_veth(uns)
 * zdtm/static/macvlan(ns)
 * zdtm/static/netns(uns)
 * zdtm/static/netns-nf(ns)
 * zdtm/static/sit(ns)

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2020-02-04 12:37:37 -08:00
Radostin Stoyanov
ad7e82a30f scripts: Drop Fedora 28/rawhide fix
This change was introduced with c75cb2b and it is no longer necessary.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2020-02-04 12:37:37 -08:00
Radostin Stoyanov
5721e61000 scripts: Install flake8 with dnf in Fedora
In the Fedora tests we install python3-pip only to install flake8.

This is not necessary as there is a Fedora package for flake8.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2019-09-07 15:59:55 +03:00
Radostin Stoyanov
2a683849b9 scripts: Set PYTHON=python3 in Fedora Dockerfiles
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2019-09-07 15:59:55 +03:00
Radostin Stoyanov
cd87a628e1 scripts: Remove yaml/ipaddress Py2 fedora modules
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2019-09-07 15:59:55 +03:00
Adrian Reber
229a8ab06b scripts: remove python2 from Fedora Dockerfiles
More and more python2 packages are being removed from future Fedora
releases. This removes python2 packages explicitly listed in CRIU's
Dockerfiles, which all are not required for the current level of
testing.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-09-07 15:59:55 +03:00
Adrian Reber
9fe8960d89 scripts: add possibility to override docker with podman
To be able to run the test containers in scripts/build with podman this
puts the name of the container runtime into $CONTAINER_RUNTIME.

Now it can be overridden with

make fedora-rawhide CONTAINER_RUNTIME=podman

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-09-07 15:59:55 +03:00
Sebastiaan van Stijn
b758e4b476 Replace libprotobuf-c0-dev with libprotobuf-c-dev
The `libprotobuf-c0-dev` virtual package is no longer available
in Debian Buster, but is provided by `libprotobuf-c-dev`, which
is available.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-07 15:59:54 +03:00
Radostin Stoyanov
73d3ddef34 travis: Enable TLS testing
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2019-09-07 15:59:53 +03:00
Radostin Stoyanov
bf62dbbe08 make: Use asciidoctor by default
The final release of asciidoc was on Sep 29, 2017 and the development
is continued under asciidoctor.

With commit 0493724 (Documentation: Allow to use asciidoctor for
formatting man pages) was added support for this tool by introducing
USE_ASCIIDOCTOR.

However, using asciidoctor by default might be a better option. With
this change CRIU will use asciidoctor if installed. Otherwise, it will
fallback to asciidoc.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2019-09-07 15:59:51 +03:00
Andrei Vagin
0d5c0b2d3a scripts/build: use the last stable release for s390
And get qemu-static from the 18.04 LTS Ubuntu repos.

https://github.com/checkpoint-restore/criu/issues/652
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-04-20 20:25:26 -07:00
Andrei Vagin
b8fdcd71f8 travis/fedora: install the kmod package
This patch fixes the error:

(00.074175) Error (criu/net.c:2638): Locking network failed:
iptables-restore returned -1. This may be connected to disabled
CONFIG_NETFILTER_XT_MARK kernel build config option.

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-04-20 20:25:26 -07:00
Andrei Vagin
02018f01f1 travis: switch to the Ubuntu Xenial
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-04-20 20:25:26 -07:00
Adrian Reber
077409c197 travis: fix rawhide test by also installing sudo
Signed-off-by: Adrian Reber <areber@redhat.com>
Acked-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Acked-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-30 19:27:53 +03:00
Adrian Reber
ae55a6ccd5 tests: fix builds on alpine and centos
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

v3:
 * Andrei is of course right and sleep is not good solution.
   After adding --status-fd support to criu service, this
   is how we now detect that criu is ready.

v4:
 * This was much more complicated than expected which is related
   to the different versions of the tools on the different travis
   test targets. There seems to be a bug in bash on Ubuntu
    https://lists.gnu.org/archive/html/bug-bash/2017-07/msg00039.html
   which prevents using 'read -n1' on Ubuntu. As a workaround
   the result from CRIU's status FD is now read via python.

   Another problem was discovered on alpine with the loop restore test.
   CRIU says to use setsid even if the process is already using setsid.
   As a workaround, still with setsid, this process is now using
   shell-job true for checkpoint and restore.

Parts of v2 have been committed before. So the changes from this commit
are partially already in another commit.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-30 19:27:52 +03:00
Adrian Reber
2c5b2785ed tests: fix builds on alpine and centos
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>
2018-10-30 19:27:52 +03:00
Adrian Reber
fc11d59db1 travis: fix building on s390x
The travis build for s390x started to fail with:

Failed to fetch http://security.debian.org/debian-security/dists/jessie/updates/InRelease Unable to find expected entry 'main/binary-s390x/Packages' in Release file (Wrong sources.list entry or malformed file)

This changes the repository definition just like it is done for ppc64le.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-07-10 08:38:09 +03:00
Andrei Vagin
5604ccbe60 build/docker: install packages to run tests
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-07-09 18:26:48 +03:00
Andrei Vagin
841edaf317 lib: a few fixes to be compatible with python3
All these issues was found by running test/crit-recode.py

https://github.com/checkpoint-restore/criu/issues/495

v2: drop FD_CLOEXEC for swrk descriptors
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-07-09 18:26:48 +03:00
Andrei Vagin
0dab224be6 travis: set python3 as default for fedora containers
We need a few jobs to check a compatibility with python3

v2: fix inhfd and rpc tests
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-07-09 18:26:48 +03:00
Adrian Reber
553dd546b5 travis: fix python2 package installation
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>
2018-07-09 18:25:16 +03:00
Andrei Vagin
1099cf0639 travis: build criu and run tests on centos
It is one of our target platforms.

Cc: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Acked-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-07-04 04:16:09 +03:00
Andrei Vagin
5d3ea878fb travis: rollback to fedora 27
We have a few issues with fc28. For example:
https://github.com/checkpoint-restore/criu/issues/469

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-12 11:45:33 +03:00
Kir Kolyshkin
0284e70f4d scripts/build/binfmt_misc: fix for bash
There was a "; done" leftover here, somehow ignored by dash
but not bash. Remove it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-05-12 11:44:33 +03:00
Kir Kolyshkin
a2ab074eca scripts/build/Dockerfile.rawhide: rm
It is not used, probably was committed by mistake.

Fixes: 2d093a170227 ("travis: add a job to test on the fedora rawhide")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-05-12 11:44:32 +03:00
Kir Kolyshkin
c75cb2b58b CI: fix Fedora rawhide
Fix Fedora rawhide CI failure caused by coreutils-single and our
way of running under QEMU.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-05-12 11:44:32 +03:00
Kir Kolyshkin
7c4ddebc35 scripts/build/Dockerfiles: nitpicks
1. Sort lists of packages to be installed, unify indentation.

2. Merge "ccache -s" and "ccache -z".

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-05-12 11:44:32 +03:00
Andrei Vagin
6aa4a9c2f1 netns: restore internal veth devices
When we dump a veth device, the kernel reports where a peer device lives
and we use this information to restore this veth pair.

On restore we set a net ns id for a peer and it is created in the required
netns.

v2: add more comments
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-02-15 21:45:08 +03:00
Andrei Vagin
15b29140a8 travis: check compilation for arm64v8/fedora:rawhide
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-22 06:36:12 +03:00
Andrei Vagin
061a407ce3 alpine: compile all tests
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-17 08:40:44 +03:00
Andrei Vagin
2d093a1702 travis: add a job to test on the fedora rawhide
This job is optional and it don't affect the status of a whole job.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-17 08:40:44 +03:00
Andrei Vagin
833c10450d travis: use a last alpine release to build criu
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-17 08:40:10 +03:00
Andrei Vagin
32191ac444 travis: use xenial instead of zesty
xenial is LTS and it is more stable and popular.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-17 08:40:10 +03:00