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

31 Commits

Author SHA1 Message Date
Radostin Stoyanov
31b38d662d ci: test interrupt-only mode with frozen cgroup
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-11-11 19:33:31 -08:00
Radostin Stoyanov
f8f0e1df76 seize: enable support for frozen containers
Container runtimes like CRI-O and containerd utilize the freezer cgroup
to create a consistent snapshot of container root filesystem (rootfs)
changes. In this case, the container is frozen before invoking CRIU.
After CRIU successfully completes, a copy of the container rootfs diff
is saved, and the container is then unfrozen.

However, the `cuda-checkpoint` tool is not able to perform a 'lock'
action on frozen threads.  To support GPU checkpointing with these
container runtimes, we need to unfreeze the cgroup and return it to its
original state once the checkpointing is complete.

To reflect this new behavior, the following changes are applied:
 - `dont_use_freeze_cgroup(void)` -> `set_compel_interrupt_only_mode(void)`
 - `bool freeze_cgroup_disabled` -> `bool compel_interrupt_only_mode`
 - `check_freezer_cgroup(void)` -> `prepare_freezer_for_interrupt_only_mode(void)`

Note that when `compel_interrupt_only_mode` is set to `true`,
`compel_interrupt_task()` is used instead of `freeze_processes()`
to prevent tasks from running during `criu dump`.

Fixes: #2508

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-11-11 19:33:31 -08:00
Andrei Vagin
e1331a4b60 fault: allow to check dont_use_freeze_cgroup
Adds a new "fault" to call dont_use_freeze_cgroup.

Signed-off-by: Andrei Vagin <avagin@google.com>
2024-09-19 15:23:42 -07:00
Bhavik Sachdev
f171649264 test/dump-crash: check code path when dump crashes
Signed-off-by: Bhavik Sachdev <b.sachdev1904@gmail.com>
2024-09-11 16:02:11 -07:00
Adrian Reber
900909d95e test: check for btrfs in the current directory
The old test was checking if '/' is btrfs but we should check if the
current directory is btrfs.

Signed-off-by: Adrian Reber <areber@redhat.com>
2024-09-11 16:02:11 -07:00
KKrypt
34e2b02219 Optimized shell code with <'s (instead of cat + |)
This patch optimizes shell code as reading a single file as input using a 'cat' command to a program.

It is considered to be a Useless Use of Cat (UUOC).

It's more efficient to simply use redirection.

However, in some cases, even using the redirection operator '<' seems unnecessary.

Signed-off-by: KKrypt <sankalpacharya1211@gmail.com>
2023-04-15 21:17:21 -07:00
Alexander Mikhalitsyn
5c0b4fbcda ci: criu-fault: skip inotify_irmap fault-injection on btrfs
It looks like we've got broken fhandles from fdinfo
for inotifies/fanotifies for btrfs. I will look into that.

Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
2022-04-28 17:53:52 -07:00
Alexander Mikhalitsyn
583e8ca055 ci: enable x86 xsave fault injection tests back
Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
2022-04-28 17:53:52 -07:00
Adrian Reber
14075baf72 test: do not use --keep-going for single zdtm tests
Looking at CI logs there are often messages like:

 "[WARNING] Option --keep-going is more useful when running multiple tests"

This commit removes '--keep-going' from single zdtm test runs.

Signed-off-by: Adrian Reber <areber@redhat.com>
2022-04-28 17:53:52 -07:00
Adrian Reber
a52185ffe3 ci: disable broken tests until fixed
Broken tests are being tracked at

 * https://github.com/checkpoint-restore/criu/issues/1669
 * https://github.com/checkpoint-restore/criu/issues/1635

This also enables previously disabled BPF related tests:

 * https://github.com/checkpoint-restore/criu/issues/1354

Signed-off-by: Adrian Reber <areber@redhat.com>
2022-04-28 17:53:52 -07:00
Dmitry Safonov
39b7252c6f fault-injection: Run fpu corruption tests
For the thread leader and for subthreads too.

Signed-off-by: Dmitry Safonov <dima@arista.com>
2021-09-03 10:31:00 -07:00
Andrei Vagin
d38851c9bd test/jenkins: use bash to run shell scripts
We permanently have issues like this:
./test/jenkins/criu-iter.sh: 3: source: not found

It looks like a good idea to use one shell to run our jenkins scripts.

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-10-20 00:18:24 -07:00
Pavel Tikhomirov
38793699e7 test/jenkins: remove empty line at the end of file
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
2020-03-27 19:36:20 +03:00
Andrei Vagin
f1714ccce7 test/vdso: check the code path when here is no API to map vDSO
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-02-16 09:14:37 -08:00
Cyrill Gorcunov
78d4f7c352 test: jenkins -- Add huge shmid fault into the tests
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-11-23 20:23:13 +03:00
Dmitry Safonov
8459a3de9d vdso/zdtm: Add iterative proxification test
Test for previously fixed bugs for vdso-trampolines insertion:
- unmapping original vvar (which went unnoticed)
- leaving rt-vvar after each C/R cycle and resulting pollution

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-09-21 00:56:51 +03:00
Dmitry Safonov
a90c07d6dd fault/vdso/restorer: add force-injection of trampolines
To check that jump trampolines to rt-vdso works.

Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 09:36:07 +03:00
Pavel Emelyanov
649280e31d pagemap: Fault inject partial pages.img read
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-03-02 00:19:03 +03:00
Andrei Vagin
9c26bae05a fault: check link_remaps if the restore fails at the last moment
link-remap files has to be deleted only if processes have been
restored successfully. Otherwise we can want to repeat an attempt,
but it is imposible if some link-remap files were deleted.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-21 11:23:02 +03:00
Andrew Vagin
fafdfb4754 faul-inject: Check a case when parasite can't initialize a command socket
Give a fake address for a server socket.

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-08-11 16:18:43 +03:00
Andrew Vagin
93e922238d criu: check that ghost files are cleaned up in error cases
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-08-01 16:51:33 +03:00
Andrew Vagin
9205fc3dec travis: add more tests to maximise code coverage
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-08-01 16:51:05 +03:00
Pavel Emelyanov
4576a03385 tests: Check that no-breakpoints restore works
v2: Don't clear_breakpoints too.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-05-06 14:38:29 +03:00
Dmitry Safonov
35f209ff76 fault: add dump pages fault for parasite_dump_pages_seized
Parasite should cleanup after fauilure and remove read-protection
from VMAs. Check it with maps00 test & fault injection.

Tested on travis with some addition:
python test/zdtm.py run -t zdtm/static/maps00 --fault 3 --keep-going --report report -f h || false
https://travis-ci.org/0x7f454c46/criu/jobs/119252291

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-04 17:10:15 +03:00
Pavel Emelyanov
070d420be6 test: Check nomemfd parasite injection
By default criu tries to create parasite mem with memfd syscall,
which is present in many systems. Let's check also the legacy way.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-04 17:10:14 +03:00
Sergey Bronnikov
229a6edfbd jenkins: change jenkins script to run full set of tests
add options --keep-going and --report (if it was absent)
to run full testrun with report creation

Signed-off-by: Sergey Bronnikov <sergeyb@openvz.org>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Andrei Vagin
c5c5434506 fault: add ability to fault open_by_handel in check_open_handle
From code coverage report, we found that inotify_irmap doesn't test irmap
cache, because we is always able to resolve path from /proc/PID/fd/X.

Current view:	top level - criu - irmap.c (source / functions)			Hit	Total	Coverage
Test:	criu.info		Lines:	40	223	17.9 %
Date:	2016-03-16		Functions:	4	13	30.8 %

This series introduces a new fault to emulate a situation
when a file can't be opened by handle and we have to find
it in the irmap cache/

It's required to test irmap cache. I don't know how to force it
without this patch. Each time when a file can be opened by handle,
its path can be resolved via /proc/PID/fd/X.

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:36:13 +03:00
Pavel Emelyanov
c07ef80481 jenkins: The "live" subdir is no longer there
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-20 15:51:07 +03:00
Pavel Emelyanov
8135e26ae3 jenkins: Fix path to zdtm.py in criu-fault
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-11-23 13:22:08 +03:00
Pavel Emelyanov
e6859679cd jenkins: Mark criu-fault test as executable
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-11-23 12:42:22 +03:00
Pavel Emelyanov
2b5a11a7a3 jenkins: Add job for known fault injections (v2)
v2: Add --report for report generation

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
2015-11-23 11:48:23 +03:00