- 25 Mar, 2016 11 commits
-
-
Sergey Bronnikov authored
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>
-
Sergey Bronnikov authored
Signed-off-by:
Sergey Bronnikov <sergeyb@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Saied Kazemi authored
The "criu check" command to check if the kernel is properly configured to run criu is broken. The "criu check --ms" command used to be the way to tell criu to check only for features that have been merged upstream. But recent kernels have a set of features whose presence doesn't necessarily mean that dump or restore will fail but rather *may* fail depending on whether the process tree uses those features. This patch deprecates --ms and introduces --extra, --experimental, and --all. See "criu --help" or "man criu" for more info. Typical use cases are: $ sudo criu check <zero or more warnings and errors...> Looks good. $ echo $? 0 $ sudo criu check --extra <zero or more warnings and errors...> Looks good. $ echo $? 1 $ sudo criu check --extra <one or more warnings...> Looks good but some kernel features are missing which, depending on your process tree, may cause dump or restore failure. $ echo $? 1 $ sudo criu check --feature list mnt_id aio_remap timerfd tun userns fdinfo_lock seccomp_suspend \ seccomp_filters loginuid cgroupns $ sudo criu check --feature mnt_id Warn (cr-check.c:283): fdinfo doesn't contain the mnt_id field $ echo $? 1 $ sudo criu check --feature tun tun is supported $ echo $? 0 Signed-off-by:
Saied Kazemi <saied@google.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrey Vagin authored
Fixes #134 Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
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>
-
Sergey Bronnikov authored
changed per request from Andrey Vagin Signed-off-by:
Sergey Bronnikov <sergeyb@openvz.org> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
The bug was fixed in libnl-3 3.2.24, but rhel7 and the Trusty ubuntu don't update this packet yet commit b50a36bf34e7452377ab9bbb4d1873b68c65bf72 Author: Samuel Gauthier <samuel.gauthier@6wind.com> Date: Fri Nov 29 09:28:44 2013 +0100 The commit 6a8d90f5fec4 "attr: Allow attribute type 0" intended to allow the parsing of {netlink,packet,unix}_diag, even if they are using type 0 for valid attributes. It lacked this part in nla_parse. Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by:
Samuel Gauthier <samuel.gauthier@6wind.com> Signed-off-by:
Thomas Graf <tgraf@suug.ch> Fixes #137 Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Sergey Bronnikov authored
Usually we run CRIU tests automatically using Jenkins CI and it reports status as PASS/FAIL for overall testsuite on used environment. You should dig into log files to figure out how many tests were failed and skipped. This patch brings support of cute reports in TAP (Test Anything Protocol) format. The sample of report: TAP version 13 1..242 ok 1 - conntracks # SKIP manual run only ok 2 - busyloop00 ok 3 - sleeping00 ok 4 - pid00 ok 5 - caps00 ok 6 - wait00 NOTE: report will be generated only when options --keep-going and --report are specified. Signed-off-by:
Sergey Bronnikov <sergeyb@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Sergey Bronnikov authored
Introduce an option --keep-going to make ability to run all planned tests and ignore failed tests. Also with this option zdtm.py will keep image files and output log for each failed test: [vagrant at fedora test]$ find sergeyb-xxx -maxdepth 3 sergeyb-xxx sergeyb-xxx/zdtm_static_bridge_ns sergeyb-xxx/zdtm_static_bridge_ns/images sergeyb-xxx/zdtm_static_bridge_ns/images/1 sergeyb-xxx/zdtm_static_bridge_ns/output sergeyb-xxx/zdtm_static_bridge_ns/images.0 sergeyb-xxx/zdtm_static_bridge_ns/images.0/1 sergeyb-xxx/zdtm_static_bridge_ns/output.0 sergeyb-xxx/zdtm_static_deleted_unix_sock_h sergeyb-xxx/zdtm_static_deleted_unix_sock_h/output sergeyb-xxx/zdtm_static_deleted_unix_sock_h/output.0 sergeyb-xxx/zdtm_static_deleted_unix_sock_h/output.1 Signed-off-by:
Sergey Bronnikov <sergeyb@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
because the kernel uses nlattr for these messages. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 23 Mar, 2016 6 commits
-
-
Laurent Dufour authored
The build on powerPC has been broken when doing some code cleanup recently. This patch fixes these regressions. Fixes: f8a1a1d8d95e ("parasite-syscall: get rid of code_syscall{,size} globals") Fixes: 69d88241584e ("sigframe: move setup_sas & make it inliner") Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Autogenerated by @gen-built-in Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Add ability to specify prerequsites and phony targets. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Impact: No functional changes, cleanup Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
I think, we may safely remove this exports, as: - code_syscall is used only in one function, which now will have it as a parameter; - code_syscall_size must be equall to BUILTIN_SYSCALL_SIZE under BUILD_BUG_ON, so BUILTIN_SYSCALL_SIZE may be used instead. (see ptrace(2) - align restriction to PTRACE_PEEKUSER). This will reduce arch-depended code coupling a little. (and I also interested in this because of I need __parasite_execute_syscall to execute 32-bit syscall code on x86_64, which I prefer to leave without some CONFIG_X86_64 as it's generic code) Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Saied Kazemi authored
To preload netfilter modules, criu runs "iptables -L" and "ip6tables -L" before starting to dump or restore a process tree. On systems with many entries, the above commands without the -n option take a long time because of lengthy DNS lookups. Signed-off-by:
Saied Kazemi <saied@google.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 21 Mar, 2016 8 commits
-
-
Cyrill Gorcunov authored
If an error occured during freezer_wait_processes we are freeing processes_to_wait_pids array but same time take freezer_detach on error path to execute, which lead in nil dereference in best case. Simply zap dangling pointer and make sure it exist in freezer_detach. Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Since commit 22396f76 ("restore: construct sigframe in crtools") sigframe is unused in restore_thread_common, as restore gpregs/fpu regs now does construct_sigframe. Impact: cleanup Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
These tests do some work while being C/R-ed, so it make sense to let them do some progress before doing so. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
We can generate footer dynamically and provide criu.8 version the same as the program has. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
We may enter with @root_item = NULL in case of error handling, so simply bail out. Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
The commit 16e673c2f6a0 ("cr-check: Inspect errno on syscall failures") reverts the way the returned the error returned by kcmp is checked. As a consequence 'criu check' is always failing with the following message: Error (cr-check.c:165): System call kcmp is not supported: No such process This patch ensure is reported only if syscall(SYS_kcmp) returns ENOSYS. Fixes: 16e673c2f6a0 ("cr-check: Inspect errno on syscall failures") Looks-good-to: Filipe Brandenburger <filbranden@google.com> Cc: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 18 Mar, 2016 2 commits
-
-
Cyrill Gorcunov authored
We're using general syscall-codes.h in criu itself so make sure the headers we include do not override system headers definitions. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 16 Mar, 2016 13 commits
-
-
Andrew Vagin authored
Since getpriority() can legitimately return the value -1, it is necessary to clear the external variable errno prior to the call, then check it afterward to determine if -1 is an error or a legitimate value. Cc: Filipe Brandenburger <filbranden@google.com> Fixes: 16e673c2f6a0 ("cr-check: Inspect errno on syscall failures") Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
According to man, glibc brk reports 0 on success, but we need current brk Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Cc: Saied Kazemi <saied@google.com>
-
Laurent Dufour authored
Cc: Andrey Vagin <avagin@openvz.org> Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
We define own SYS_memfd_create in case if it's missing in libc, but we need it for user-namespace restore. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
This patch changes the way the per architecture syscall-codes.h is generated to define __NR* and SYS_* constants only if there are not already defined. This way this file could be included in the C files calling syscall() to ensure the SYS_* constant is defined even if the C library is too old. The file syscall-codes.h should be included after the C library header files. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
We don't need it since we use syscall() libc wrapper. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Filipe Brandenburger authored
After replacing sys_kcmp with syscall() and sys_prctl with prctl(), the API is changed to return -1 and set errno on failure (instead of returning the negative value of the error code directly on return.) Commit 8ceab588 ("crtools: no more linked with builtin syscall") replaced calls to sys_kcmp and sys_prctl, but did not update the checks for ret to check for -1 and errno, so update them here. Also make the comparisons for the return value explicit checks for a negative value (expected -1) instead of just failing on a non-zero value with the implicit comparison. Add %m to report what errno was set to on failed syscalls, to make it easier to troubleshoot a check failure. Tested that now `criu check --ms` stopped reporting the misleading: prctl: One needs CAP_SYS_RESOURCE capability to perform testing. Instead, now it reports: Error (cr-check.c:165): System call kcmp is not supported: No such process Warn (cr-check.c:195): Skipping unssuported PR_SET_MM_MAP: Invalid argument prctl: PR_SET_MM is not supported: Invalid argument And those messages include the error message that explains why the syscall failed. Reported-by:
Saied Kazemi <saied@google.com> Fixes: 8ceab588 ("crtools: no more linked with builtin syscall") Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Ivan Shapovalov authored
Signed-off-by:
Ivan Shapovalov <intelfx@intelfx.name> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Ivan Shapovalov authored
Signed-off-by:
Ivan Shapovalov <intelfx@intelfx.name> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Ivan Shapovalov authored
This is to deal with distros like Arch which take /usr merge to the extreme and set their $PATH to something like /usr/local/bin:/usr/bin (no /usr/sbin, no /{s,}bin), which breaks our rather inflexible nsroot population logic. Signed-off-by:
Ivan Shapovalov <intelfx@intelfx.name> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Now, we execute this test in a test mount namespace, which contains only test mounts. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Here are all tests which pass now And I created an issue to investigate fails of other tests: https://github.com/xemul/criu/issues/136Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
We have two formats for devices and we had to use proper helpers for them and compare values of a one format. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-