Commit graph

427 commits

Author SHA1 Message Date
Radostin Stoyanov
9bef478078 ci: exclude lazy-thp for remote pages over tls
Temporarily disable this test until the #1380 is resolved.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-04-21 08:43:43 -07:00
Radostin Stoyanov
31b64473ce Dockerfile: add missing test dependencies
This patch adds missing dependencies required to run
the zdtm tests.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-04-20 22:54:19 -07:00
Radostin Stoyanov
2d189ca7f7 Dockerfile: re-build criu after clean
In order to be able to run the zdtm tests inside a container,
we have to make sure that all protobuf sources have been compiled.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-04-20 22:54:19 -07:00
Radostin Stoyanov
66a259f155 Dockerfile: use 'git clean' before build
The 'make docker-build' command creates a copy of all files from the
in local CRIU clone inside a container.

Then it runs 'make mrproper' inside the container, followed by
compilation of criu, followed by another 'make mrproper'.

After the last mrproper command, it attempts to check if
the clean was successful by running 'git clean'.

However, this check fails when the local repository contains
files that are not part of the repository.

For example, the vscode editor creates the folder '.vscode/'
which would be copied inside the docker container and cause
'make docker-build' to fail.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-04-20 22:54:19 -07:00
Radostin Stoyanov
901ea2b568 scripts/build: drop obsolete ENV1 variable
The ENV1 variable was first introduced with commit
7290de5 (travis: enable ccache for docker/qemu builds)
and it is not used anymore.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-04-12 21:57:54 -07:00
Adrian Reber
38a9cbe7af ci: enable crit tests in CI
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-03-30 08:28:28 -07:00
Adrian Reber
ca032081e3 ci: move CentOS 8 based test to Cirrus
The kernel on GitHub Actions has a bug

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1919472

which breaks our CI. It works on Cirrus. Let's move it there.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-03-22 08:00:44 -07:00
fedor
9b0d752791 Use a real VM instead of a privileged container 2021-03-19 01:35:36 -07:00
Radostin Stoyanov
d49ace9d34 criu-ns: Merge comparisons with 'in'
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
66f5ab4392 criu-ns: Add unsupported msg for restore-sibling
Currently criu-ns does not support the --restore-sibling option.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
719c5b07e0 criu-ns: Handle restore-detached option
The criu-ns script creates a new PID namespace where criu is the "init"
process. When using the --restore-detached option with criu-ns, users
expect criu-ns to exit without killing the restored process tree.

Thus, criu-ns should not pass the --restore-detached to criu to prevent
it from terminating, and it should exit instead of waiting for criu's
exit status.

Resolves #1278

Suggested-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
6055d0be74 criu-ns: Pass arguments to run_criu()
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
b31d3ad927 criu-ns: Close namespace fd before raise
It is a good practice to close open file descriptors.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
44a1d321bf criu-ns: Extract set namespace functions
This change extracts some of the duplicated code from
set_pidns() and set_mntns() functions.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
ab9418d96c criu-ns: Remove unused _umount
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
b790ce21ef criu-ns: Use documentation strings
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
097834dad0 criu-ns: Extract wait for process into a function
Reduce duplication of code.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
c7d76082c3 criu-ns: Extract mount new /proc into a function
By extracting this code into a function the main code becomes
smaller and more obvious.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
a6659c3a7c criu-ns: Remove space before/after bracket
Avoid extraneous whitespace.
https://python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-statements

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Radostin Stoyanov
42df84994a criu-ns: Convert indentation to spaces
Spaces are the preferred indentation method.
https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-14 14:44:01 -07:00
Zeyad Yasser
628ff18fce ci: run zdtm/transition/pid_reuse with pre-dumps in ci tests
This test should be run with at least 1 pre-dump to trigger the problem as mentioned in commit 4d9bf608b5.

Signed-off-by: Zeyad Yasser <zeyady98@gmail.com>
2021-03-14 14:41:23 -07:00
Adrian Reber
b7d2c2a26f ci: remove ccache setup
ccache was set up in Travis to speed up compilation by re-using the
.ccache directory from previous CI runs. As we are no longer using
Travis we can remove all CI related ccache setup.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-03-14 10:25:53 -07:00
Adrian Reber
9f2a696910 ci: run recode tests on more input files
We were running crit-recode in CI only on the output of
zdtm/static/env00.

This adds zdtm/transition/fork and zdtm/static/ghost_holes00
to run through crit-recode as the image files from those test
triggered errors in Jenkins we did not see in CI.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-03-14 10:25:30 -07:00
Adrian Reber
cdfca86944 ci: remove '-Wl,-z,now' workaround
This removes extending LDFLAGS with '-Wl,-z,now'. This was added as
workaround but never really worked. It is correctly fixed with
pull request #1379

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-03-14 10:24:20 -07:00
Radostin Stoyanov
fddf3a7327 docker-test: set log file path
By default docker writes logs in a run-time directory unique for each
container. To be able to read this file, we can specify the path in
CRIU's configuration file for runc.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-09 22:21:55 -08:00
Radostin Stoyanov
19be9ced92 docker-test: use containerd v1.5.0-beta.0
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-09 22:21:55 -08:00
Radostin Stoyanov
b51fb87a44 ci: move Travis CI Docker tests to GitHub Actions
Travis CI is no longer providing CI minutes for open source projects.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-03-09 22:21:55 -08:00
Dmitry Safonov
f8cf0715e2 ci/compat: Check if tests are 32-bit ELFs
To be sure that we don't lose COMPAT_TEST=y on the way to make.

Signed-off-by: Dmitry Safonov <dima@arista.com>
2021-03-02 08:07:06 -07:00
Adrian Reber
168668ec75 ci: fix Fedora rawhide CI failures
It seems the Fedora rawhide /tmp is no longer 1777 but 755.

Change it back to 1777 to make our CI runs successful again.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-03-01 10:42:31 -07:00
Radostin Stoyanov
7a8f426f15 test: Reduce verbosity of mvn output
The -q option will only show errors

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-02-18 23:14:20 -07:00
Adrian Reber
a277c84936 ci: use runc instead of crun for podman tests
The latest podman pulls in crun instead of runc. Unfortunately crun is
not built against libcriu and does not support checkpoint/restore.

Switch back to runc.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-02-18 21:04:01 -08:00
Adrian Reber
042560a2fd ci: move coverage run to github
This also connects the coverage run to codecov.io.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-02-06 14:56:12 -08:00
Adrian Reber
81c3c9748a ci: move compat tests to Github Actions
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-02-05 09:28:27 -08:00
Adrian Reber
5792612d31 ci: move asan and image streamer test to github
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-02-05 09:22:52 -08:00
Adrian Reber
b62707bc1a Tell podman to use vfs as storage-driver
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-01-31 19:14:30 -08:00
Adrian Reber
41efd592ed ci: move Fedora Rawhide based tests away from Travis
This moves Fedora Rawhide based tests away from Travis. To Github
Actions for x86_64 and to Drone for aarch64.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-01-31 19:13:44 -08:00
Adrian Reber
442dc65150 ci: factor out Fedora Rawhide CI setup
To run Fedora Rawhide based aarch64 containers on Drone CI our current
Dockerfile setup does not work.

This moves the package installation out of the Dockerfile into
scripts/ci/prepare-for-fedora-rawhide.sh to be usable in the Dockerfile
environment and in the Drone CI environment.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-01-31 19:13:44 -08:00
Adrian Reber
8c89fbde39 ci: skip bpf tests on vagrant
See: https://github.com/checkpoint-restore/criu/issues/1354

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-01-31 19:12:20 -08:00
Adrian Reber
9ec1f1a7be ci: upgrade vagrant and Fedora version
The updates to the latest Vagrant version and from Fedora 32 to 33.

Also using --no-tty instead of > /dev/null for vagrant up.

Also run 'dnf upgrade -y' in out vagrant VM to get the latest kernel.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-01-29 23:01:53 -08:00
Adrian Reber
76f9ccc708 ci: also use clang for compel-host-bin
Running in an environment with clang and without gcc even installed
does not work as compel-host-bin uses HOSTCC which defaults to gcc.

If CLANG=1 is set this also sets HOSTCC to clang to actually build
compel-host-bin with clang and not with gcc.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-01-29 09:07:50 -08:00
Adrian Reber
7766f12e94 ci: run aarch64 compile tests on Drone
Besides Travis CI Drone CI seems to be only service providing ARM based
builds. This switches the aarch64 and arm32 builds to drone.io.

Because Drone CI is running in a Docker container we cannot use 'setarch
linux32' as it requires the blocked syscall 'personality(2)'.

But Drone CI provides an 'arch: arm' which gives the same architecture
as 'setarch linux32' on Travis aarch64: armv8l

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-01-29 09:07:50 -08:00
Adrian Reber
9807413c39 ci: move vagrant test to cirrus ci
With Travis dramatically reducing the minutes available for CI, CRIU
needs a new place to run tests. This moves the Vagrant based Fedora 32
no VDSO test cases to Cirrus CI. Cirrus CI seems to be one of the very
few free CI services allowing access to /dev/kvm.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-01-29 09:02:49 -08:00
Radostin Stoyanov
1b3274a909 ci: Enable compel testing
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-01-12 20:47:46 +00:00
Adrian Reber
5351b6efe8 ci: Alpine's busybox based free does not understand -h
Signed-off-by: Adrian Reber <areber@redhat.com>
2020-12-27 23:21:17 -08:00
Adrian Reber
944bd0b6ea ci: give an overview of the current CI environment
As CRIU is using multiple different CI systems this adds a printout to
each CI run about the CI environment for easier debugging of possible
errors.

Also use V=1 to build CRIU and the tests to easily see which compiler
and which options are used.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-12-22 11:09:39 -08:00
Adrian Reber
52bbac5a9a ci: add Circle CI definition
Circle CI provides bare metal test systems which are a very good
environment for the CRIU test cases. This adds two CI runs on Circle CI.

On Circle CI it is necessary to tell clang to use '-Wl,-z,now', because
gcc has it hard-coded in Ubuntu and clang does not.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-12-22 11:09:39 -08:00
Dmitry Safonov
bde4e8565d scripts/Docerfile.centos8: Use 'powertools' repo name
See https://bugs.centos.org/view.php?id=17920

Signed-off-by: Dmitry Safonov <dima@arista.com>
2020-12-14 23:08:04 -08:00
Adrian Reber
3cf87ed485 ci: use graviton2 for arm64 tests on Travis
Using travis-ci.com instead of travis-ci.org offers access to bare metal
aarch64 based systems and thus enabling us to run the full CRIU CI test
suite.

Switch arm64 based tests to arm64-graviton2 for tests.

This is the first non x86_64 architecture running tests and not just
compile in Travis.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-11-23 09:25:53 -08:00
Adrian Reber
ffac3d649d ci: add CentOS 8 based CI run
Our CentOS based CI run is based on CentOS 7. CentOS 8 exists already
for some time and CentOS 7 will probably go end of life at some point.

This adds a CentOS 8 based CI run to be prepared for the time CentOS 7
goes away.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-11-08 01:55:25 -08:00
Adrian Reber
407404297e ci: switch centos7 to github actions
Signed-off-by: Adrian Reber <areber@redhat.com>
2020-11-08 01:55:25 -08:00