2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-25 19:38:38 +00:00

52 Commits

Author SHA1 Message Date
Adrian Reber
8d7742a167 Revert "Revert "travis: run test/other/rpc tests""
This reverts commit 3abb6f5cd6a2d3056ed7ba372f8439ae4d66163d.

This reverts the revert as the tests are now fixed.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-29 01:06:06 +03:00
Andrei Vagin
3abb6f5cd6 Revert "travis: run test/other/rpc tests"
This reverts commit 5c26d8063923bdf4213c1e8a83157ac7beede88c.

This test fails in Travis.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-23 10:14:32 +03:00
Adrian Reber
5c26d80639 travis: run test/other/rpc tests
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-19 19:59:14 +03:00
Andrei Vagin
1a1e3d7f56 test: run a full set of tests in docker containers
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Andrei Vagin
dec375f87e travis: run the crit-recode test
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00
Adrian Reber
579872a530 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-05-25 00:23:00 +03:00
Mike Rapoport
a50ae653b2 Revert "travis: temporarily disable lazy-pages testing"
This reverts commit 4459590d5ffd1fb9ee23927ee08f2f5fb0969577.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-10 00:37:01 +03:00
Mike Rapoport
85fd6abea4 test: lazy-pages: exclude maps007
With userfaultfd we cannot reliably service process_vm_readv calls. The
maps007 test that uses these calls passed previously by sheer luck.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-19 23:26:34 +03:00
Mike Rapoport
4459590d5f travis: temporarily disable lazy-pages testing
lazy-pages is currently broken, so to avoid false positives in travis
because of that, temporarily disable lazy-pages testing

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2018-04-11 15:37:36 +03:00
Andrei Vagin
1d5438310b test/other: add a test to check the --shell-job option
This test creates a pty pair, creates a test process and sets a slave
pty as control terminal for it.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-06 02:37:28 +03:00
Andrei Vagin
44dadb9a56 [v2] criu: add -fprofile-update=atomic for builds with gcov
Sometimes we see errors like this:
criu/cr-restore.gcda:Merge mismatch for function 106

It proabably means that this gcda file was corrupted. According to the
gcc man page, the -fprofile-update=atomic should fix this problem.

v2: this options appered in gcc7, so we need to install it.

Reported-by: Mr Travis CI
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-03-10 01:15:23 +03:00
Andrei Vagin
59770d4f8b phaul: run the phaul test in a docker container
golang from the Ubuntu Trusty is too old.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-11-30 01:36:15 +03:00
Andrei Vagin
ff599cd966 travis: run phaul tests
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-11-30 01:36:15 +03:00
Andrei Vagin
a6d717b7bc 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>
2017-11-30 01:22:16 +03:00
Andrei Vagin
008db0cb7a zdtm: run page-server via rpc
v2: typo fix
v3: run criu pre-dump via rpc
v4: don't use status-fd for rpc

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-11-23 20:23:23 +03:00
Mike Rapoport
9ad1287669 travis/lazy-pages: exclude lazy-thp for older kernels
The lazy-thp may fail with older kernels if khugepaded will be fast enough
to merge pages in the partially populated areas.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-22 06:34:39 +03:00
Andrei Vagin
ac21ffe215 travis: set umask before a first criu run
so that .gcda (coverage data) files are created with read-write
permissions for all, otherwise uns tests will not be able to
modify these files and code coverage data will not be collected
for them.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-17 10:21:45 +03:00
Mike Rapoport
3fb3e87058 travis/lazy-pages: explicitly define the tests to verify lazy-pages
Running all the tests with --lazy-pages and --remote-lazy-pages takes too
long. Let's run only several representing tests for those cases.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-17 08:40:44 +03:00
Andrei Vagin
251b4d06a9 zdtm: report test results in the junit format
We found a good plugin for Jenkins to analize test results,
but it can handle only the junit format.

v2: work without the junit python module
v3: install junit-xml, because zdtm.py is executed
    with the --report option from jenkins scripts.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-10-17 08:40:44 +03:00
Andrei Vagin
c1e68a947e travis: check docker checkpoint
Install the last version of Docker, start a container and C/R it a few times.
2017-10-05 21:04:21 +03:00
Mike Rapoport
6cc31a7f0b travis: exclude futex and lazy-thp tests from lazy passes
Both test seem to reproduce issue #357 [1] too frequently which make it
really annoying. Temporarily remove them from lazy-pages passes until the
issue is fixed.

[1] https://github.com/xemul/criu/issues/357

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-09-17 03:27:02 +03:00
Mike Rapoport
47b9438628 test/travis: update lazy-pages testing
* drop --keep-going etc from --lazy-pages pass
* add --remote-lazy-pages pass

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-09-16 12:30:20 +03:00
Mike Rapoport
516b779551 travis-test: select tests skipped by lazy-pages pass more carefully
Most of zdtm test should pass with --lazy-pages with kernels newer than
4.11.
Some test excluded for older kernels surprisingly pass even now, mainly
becuase they do not actually stress userfaultfd, which will be fixed in the
upcoming commits :)
The cmdlinenv00 fails even with kernel 4.11 because of a race between uffd
and gup in the case external process reads /proc/<pid>/cmdline before
memory containing the command line is populated.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-09-16 12:29:43 +03:00
Mike Rapoport
bd39d5edc5 travis: add lazy-pages run
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-09-16 11:47:03 +03:00
Mike Rapoport
98ac646f86 ppc64le: travis: fixup Ubuntu repositories
The ppc64le docker image has broken /etc/apt/sources.list. A small fixup to
it allows running ppc64le tests.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-31 00:35:34 +03:00
Dmitry Safonov
871ce841a7 travis/ia32: Remove libc6.i386 dependency
Not needed anymore for CONFIG_COMPAT.

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-06-14 09:49:30 +03:00
Kir Kolyshkin
88699b49f7 travis-tests: set CRIU_PMC_OFF conditionally
We only needed it for kernel 3.19. Apparently, Ubuntu 14.04.5 comes
with a kernel from 16.04 (i.e. 4.4), so we can disable this workaround!

Anyway, just in case, let's do it conditionally.

While at it, slightly improve the comment.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-06-14 01:59:46 +03:00
Kir Kolyshkin
2a6b8e1743 travis-tests: install less packages
asciidoc pulls in a lot of dependencies, most of those are not
needed as we just use it to convert txt to a man page. Adding
--no-install-recommended option to apt-get makes it skip those
additional dependencies. The only needed package is xmlto, so
let's add it explicitly.

This results is some 50 packages being skipped (mostly TeX/LaTeX and
some extra SGML tools), wow!

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-06-14 01:59:44 +03:00
Andrei Vagin
71dcc6e918 travis: check the --empty-ns option
Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Looks-good-to: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-19 09:17:20 +03:00
Kir Kolyshkin
e3f0c52596 travis: add "make uninstall" test
"make uninstall" is supposed to remove all the files that
"make install" (with the same arguments) have created.
This is a test to check that.

PS ideally, "make uninstall" should also remove any empty directories,
but let's not care about it for now.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02 18:09:34 +03:00
Kir Kolyshkin
29f9e6e2f1 travis: enable ccache for local builds
For now, it's done for local builds only (i.e. no per-arch Docker
builds yet). The reason is, it's easier to play with ccache when
the compiles are (relatively) fast.

Performance: there is 2x to 3x improvement in build speeds for
ideal cases (same code, hot cache), but the absolute savings
are negligible (example: 7 seconds instead of 23).

Note that ccache is not compatible with gcov, so we only enable it
for non-gcov build (which happens to be the one with clang).

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02 18:09:34 +03:00
Cyrill Gorcunov
84175119d1 compel: travis -- Disable exec tests
Not supported for a while.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14 23:58:20 +03:00
Dmitry Safonov
d771ffb942 Dockerfile: add libc6-dev-i386 & gcc-multilib
Fixes the following error on travis-ci:
  CC       arch/x86/syscalls/syscall32.o
In file included from /usr/include/signal.h:28:0,
                 from /home/travis/build/0x7f454c46/criu/criu/arch/x86/include/asm/types.h:5,
                 from arch/x86/syscalls/syscall32.c:1:
/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory
 #  include <sys/cdefs.h>
                         ^

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14 21:03:20 +03:00
Andrei Vagin
1a89b88c08 zdtm: check sequence numbers for tcp sockets
They have to be the same on each iteration.

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>
2017-01-16 11:04:49 +03:00
Andrei Vagin
aec9eb921f build: install libnet-dev
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>
2017-01-16 11:03:43 +03:00
Pavel Emelyanov
6326b5c7c2 travis: Run some zdtm-s in RPC mode
travis-ci: success for tests: Add RPC testing to CI (rev2)
Acked-by: Andrey Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-12 11:06:00 +03:00
Kir Kolyshkin
d9bd1dbb8b CI: fix travis build with clang
With this patch, Travis will build/test CRIU using clang, for real.

I swear I fixed it before, but the fix was apparently lost.

travis-ci: success for series starting with [1/3] compel: mv noexecstack from CFLAGS to LDFLAGS
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-03 01:25:17 +03:00
Andrei Vagin
58d2ee6446 travis: execute cgroup tests
I don't know why they were disabled, but they work fine.

travis-ci: success for travis: execute cgroup tests
Signed-off-by: Andrei Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-02 20:35:57 +03:00
Pavel Emelyanov
19e0221328 travis: Put package list in a variable
Patches moving code around and changing packages list conflict
with each other all the time. Split these two :)

travis-ci: success for travis: Put package list in a variable
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-24 16:00:15 +03:00
Kir Kolyshkin
5992d7198b CI: add clang build for travis-ci
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-24 16:00:15 +03:00
Kir Kolyshkin
5465179f96 CI: move GCOV flag to travis.yml
Move GCOV to travis environment, so now we can change it easily
on a per-build basis.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-24 16:00:15 +03:00
Andrei Vagin
e674a7333d scripts: allow to skip travis specific parts in travis-tests
We are going to use this script for testing linux-next.

v2: remove bashism
travis-ci: success for scripts: allow to skip travis specific parts in travis-tests (rev2)
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-13 15:48:41 +03:00
Andrew Vagin
3b366c3141 zdtm: check "criu dedup"
Add a new option to zdtm.py to run "criu dedup" after "criu dump"
or "criu pre-dump".

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:40 +03:00
Pavel Emelyanov
2e4639f7b5 travis: Add package required by new zdtm.py code
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-06 19:31:23 +03:00
Kir Kolyshkin
20f92be797 travis-tests: add test for criu --help
Make sure travis/jenkins complain if someone sends a patch
that results in criu --help output violate standard terminal
width requirement.

Cc: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-06 19:31:23 +03:00
Andrei Vagin
a654e551c9 travis: set permissions for test/, test/static/, test/transition
We need to allow read/write access for these directories to execute
tests in user namespaces. zdtm.py does this too, but it is racy if
we run a few tests in parallel.

------------------------ grep Error ------------------------
(00.748406)      5: Error (criu/files-reg.c:1487): File zdtm/static has bad mode 040777 (expect 040775)
(00.752027)      1: Error (criu/cr-restore.c:1132): 5 exited, status=1
(00.790562) Error (criu/cr-restore.c:1135): 88 killed by signal 9: Killed
(00.790623) Error (criu/cr-restore.c:2019): Restoring FAILED.
------------------------ ERROR OVER ------------------------

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-06 19:31:22 +03:00
Andrei Vagin
de2b4261dd pagemap: add an ability to disable pagemap cache
We found that the 3.19 Ubuntu kernel has a bug and
the pagemap cache doesn't work properly on this kernel.

Unfortunately Travis-CI allows to create intancies only with this kernel,
so we need to add this workaround.

https://github.com/xemul/criu/issues/207

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-06 19:31:20 +03:00
Andrei Vagin
4fd8f39669 travis: catch core dump files in error cases
It is very hard to investigate travis fails, when something is segfaulted.

Let's add our own core file handler which will provide all required
information for us. Now test/abrt.sh shows a process tree,
process mappings, registers and backtraces.

v2: change a variable name
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Thanked-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-06 19:31:20 +03:00
Andrei Vagin
cd10a09fee travis: allow to run up to two tests in parallel
It works faster and checks that two criu processes can work concurrently.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-06 19:31:19 +03:00
Pavel Emelyanov
9c7a234b3e travis: Don't run --unshare tests
They are only available on dev branch

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-08-05 12:42:27 +03:00