- 18 Mar, 2016 1 commit
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 16 Mar, 2016 27 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>
-
Andrew Vagin authored
irmap_revalidate() sets a cursor to the next element or null, then we try to dereference cursor->next in the for statemant. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
.gitid, and some of the build directories from setup.py need to be cleaned on 'clean'. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
From issue #135 Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Explicit .PHONY is preferred for style unification sake. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Remember to set tmp2 when allocating the new path so that we can free it later. Also, don't leak tmp2 in the error case. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Evgenii Shatokhin authored
It may happen that a process has completed but its files in /proc/PID/ are still open by another process (see remap_dead_pid test from zdtm suite, for example). If the PID number has been given to some newer thread since then, this can be problematic. If that thread is the main thread of some process, it seems to be handled OK on restore. However, if it is a secondary thread, restore fails with an error like: pie: Error (pie/restorer.c:439): Thread pid mismatch 4404/4403 This is because open_remap_dead_process() adds a helper with PID 4403 to restore /proc/4403/* and that clashes with the thread's PID. It seems reasonable to detect such things at the checkpoint stage and refuse to dump, rather than to fail during restore. v.3: * Loop over dead_pids[] first: the array is likely to be empty. Note that it is still needed to iterate over the threads explicitly because pstree contains no items for the threads at that point. v.2: * Check for conflicts after all tasks have been dumped. One cannot rely on any particular order of tasks being dumped. Signed-off-by:
Evgenii Shatokhin <eshatokhin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
When we bind-mount something into a shared mount, a new mount will be shared too. By default /tmp is a shared mount, so when we get a "clean mount", it will be always shared. On restore we don't need this side effect, so let's do bind-mount in a private mount. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
v2: add a comment before calling BUG_ON(mi->master_id) Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
When a mount is propagated, the result mount is always shared. If we want to get a private mount, we need to convert it. Cc: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Currently we kdev and odev together and try to compare them without converting to the one type. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
In error cases we need to exit immediatly Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
CRIU processes save *.gcda and *.gcno files near source files, so when we restore tests into another mount namespace, we need to have access to sources from this namespace. Cc: Sergey Bronnikov <sergeyb@openvz.org> Reported-by:
Sergey Bronnikov <sergeyb@openvz.org> 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>
-
- 09 Mar, 2016 7 commits
-
-
Cyrill Gorcunov authored
By default it generates archive name same as a tag name, but Pavel requested to match old scheme and strip off "v" prefix. Reported-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
v2: print test name + flavor info for each test too. v3: pass dry_run via CR_CT_TEST_INFO Output looks like this now: === Run 1/242 ---------------- Skipping zdtm/transition/thread-bomb (manual run only) Skipping zdtm/transition/file_aio (manual run only) ======================= Run zdtm/transition/maps007 in h ======================= ====================== Run zdtm/transition/maps007 in ns ======================= ====================== Run zdtm/transition/maps007 in uns ====================== === Run 4/242 ---------------- Skipping zdtm/transition/epoll (manual run only) ==================== Run zdtm/transition/pipe_shared00 in h ==================== =================== Run zdtm/transition/pipe_shared00 in ns ==================== =================== Run zdtm/transition/pipe_shared00 in uns =================== === Run 6/242 ---------------- ======================== Run zdtm/transition/fork in h ========================= ======================== Run zdtm/transition/fork in ns ======================== ======================= Run zdtm/transition/fork in uns ======================== === Run 7/242 ---------------- Skipping zdtm/transition/ptrace (manual run only) Skipping zdtm/transition/socket_loop00 (manual run only) ======================== Run zdtm/transition/ipc in ns ========================= === Run 10/242 ---------------- Skipping zdtm/transition/netlink00 (manual run only) ===================== Run zdtm/transition/socket-tcp6 in h ===================== === Run 12/242 ---------------- ... Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.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>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
After the pidfile manipulation is sanitized, we can have a helper for pidfile wrting. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
For the caller there should be only one pidfile -- the one that should be fired with TERM signal on stop. All the other stuff is test's internal business. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Svyatoslav Vlasov authored
Add new action script tmp-files.sh, which allows user to add files that can be lost between checkpoint and restore to the dump. User files are stored in .tar.gz archive. Tar command does all the file paths and attributes related work. Fixes #65 Signed-off-by:
Svyatoslav Vlasov <svloyso@gmail.com> Signed-off-by:
Eugene Batalov <eabatalov89@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 07 Mar, 2016 1 commit
-
-
Pavel Emelyanov authored
So, here it is. We planned not only to re-shuffle the code, but also to provide compel thing to people, but have only managed to do the former. OK, the compel then would go in 2.1 :) But, we also change the dev-n-release model, so from now on we have 2 branches and release stable one every month to show new stuff earlier. Have fun! Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 06 Mar, 2016 2 commits
-
-
Andrew Vagin authored
otherwise this mount will not be propagated into non-existant mounts Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
We could do the math on the consuming side (and indeed, I tried), but it seems much cleaner to just not include this in the first place so that all consumers of it don't need to do the same thing. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 04 Mar, 2016 2 commits
-
-
Tycho Andersen authored
As the comment says, we don't need to restore speical cpuset props twice, and indeed it can cause the restore to fail, e.g.: (00.092356) Error (cgroup.c:1240): cg: Failed writing 0-3 to cpuset//lxc/centoss/cpuset.cpus (00.582490) 18: Error (cgroup.c:1009): cg: Can't move 18 into systemd//lxc/centos/system.slice/systemd-journald.service/tasks (-1/-1): No such file or directory (00.582497) 18: Error (cgroup.c:1124): cg: Can't move into systemd//lxc/centos/system.slice/systemd-journald.service/tasks (-1/-1): No such file or directory (00.582567) 43: Error (cgroup.c:1009): cg: Can't move 43 into systemd//lxc/centos/system.slice/console-getty.service/tasks (-1/-1): No such file or directory (00.582573) 43: Error (cgroup.c:1124): cg: Can't move into systemd//lxc/centos/system.slice/console-getty.service/tasks (-1/-1): No such file or directory (00.582886) 1: Error (cr-restore.c:1306): 18 exited, status=1 (00.594670) Error (cr-restore.c:1308): 7906 killed by signal 9 (00.623099) Error (cr-restore.c:2138): Restoring FAILED. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
The errno here is useful information for debugging, we should also print it. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-