- 12 Jan, 2017 14 commits
-
-
Vitaly Ostrosablin authored
For ZDTM purposes, poll.c uses delta of 5 seconds, which is fine, since tests don't take a very long time to pass. However, in vzt-cpt, we start a batch with multitude of tests and starting them all could take over an hour. Hence, the test is bound to fail. An easy solution would be to introduce an environment variable, which would allow to specify the delta - ZDTM_DELTA. If it's unset (which is default behaviour in ZDTM) - it would default to 5 seconds. However, if it's set (what we can do from vzt-cpt) - then it will use delta which is set by our test. travis-ci: success for test: add variable delta for poll.c test (rev2) Signed-off-by:
Vitaly Ostrosablin <vostrosablin@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
CID 173737 (#1 of 2): Resource leak (RESOURCE_LEAK) 9. leaked_handle: Handle variable rmntns_root going out of scope leaks the handle. travis-ci: success for files: don't leak a file descriptor Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
When splicing page server data from UNIX socket we may get error (EAGAIN) from splice if no data is available on the socket yet. This is because the SPLICE_F_NONBLOCK flag is checked by af_unix.c in the kernel to decide whether or not to do blocking read. This is not symmetrical with TCP sockets, which only check for the socket's O_NONBLOCK flag for the same decicion. Dropping the SPLICE_F_NONBLOCK flag is not possible too, as otherwise we'll block on the pipe when trying to put data into it. Even if part of the data fits into it kernel would block anyway untill full buffer is in. And there will be no read() from the pipe, as it should happen one step later in the same task. So to untie this, we need to wait for the data explicitly with poll(). Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
A unix socket can be bound to itself, so we need only one socket instead of a pair of pipe. If we use a socket, we can peek a message and if it isn't for us we don't need to send it back. Currently a process reads message from pipe, if it isn't for him, it sends it back and sleeps for a random timeout. In a worst case each waiter will read and send a message back, before the right one will get it. travis-ci: success for series starting with [1/3] zdtm: call test_init() before doing anything Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
travis-ci: success for series starting with [1/3] zdtm: call test_init() before doing anything Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
test_init() has to be executed first, because it prepares a container. travis-ci: success for series starting with [1/3] zdtm: call test_init() before doing anything Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
travis-ci: success for Fetch mmap_minimal_address and drop MAP_ANON Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
We assume that mmap_minimal_address with non-default setting is not widespread but it's not true. Instead lets fetch this setting runtime. travis-ci: success for Fetch mmap_minimal_address and drop MAP_ANON Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Gleb Valin authored
This one covers the following cases: * socket is bound to an interface * socket isn't bound to an interface https://github.com/xemul/criu/issues/73 travis-ci: success for series starting with [1/2] socket: Add support for SOCK_PACKET sockets Signed-off-by:
Gleb Valin <the7winds@yandex.ru> Signed-off-by:
Eugene Batalov <eabatalov89@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Gleb Valin authored
If socket type is SOCK_PACKET it restores binding with proper address structure. https://github.com/xemul/criu/issues/73 travis-ci: success for series starting with [1/2] socket: Add support for SOCK_PACKET sockets Signed-off-by:
Gleb Valin <the7winds@yandex.ru> Signed-off-by:
Eugene Batalov <eabatalov89@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Vitaly Ostrosablin authored
Test seem to assume that zdtm lib directory is on PATH, but if it's not - calling for parseargs.sh would fail (if cwd is static). Therefore, this patch changes this to ../lib/parseargs.sh which should be fine both for zdtm and vzt-cpt. travis-ci: success for test: fix shell script tests (conntracks & route_rules) Signed-off-by:
Vitaly Ostrosablin <vostrosablin@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Adrian Reber authored
Compiling zdtm on the latest Fedora rawhide gives errors like this: ns.c: In function ‘prepare_mntns’: ns.c:122:13: error: In the GNU C Library, "makedev" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "makedev", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "makedev", you should undefine it after including <sys/types.h>. [-Werror] if (mknod("/dev/ptmx", 0666 | S_IFCHR, makedev(5, 2)) == 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors This commit fixes those errors. travis-ci: success for zdtm: fix '"makedev" is defined by <sys/sysmacros.h>' Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
When going daemon criu services ask cr_daemon() to keep some descriptors open and the routine dup2-s them. The problem is that the original descriptor is left where it was and is leaked. travis-ci: success for util: Do not leak dup-ed file descriptor Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
The idea of this test is to check non-root shared mounts which lives in a few shared groups. v2: fix the link description. travis-ci: success for test: check non-root shared mounts (rev2) Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 22 Dec, 2016 11 commits
-
-
Pavel Emelyanov authored
Most of the rest code uses int nr, so ... Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com>
-
Mike Rapoport authored
The PagemapEntry and struct iovec are quite interchangeable. PagemapEntry can be used directly in the few places that converted it to struct iovec. The only place that used iovec2pagemap can be switched to open-coded assignments without really hurting code readability. travis-ci: success for pagemap: minor cleanups (rev2) Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
travis-ci: success for pagemap: minor cleanups (rev2) Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
CID 172196, issues/233. The advance method can keep pr->pe NULL while the rest of the code doesn't count on that. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com>
-
Pavel Emelyanov authored
Now it's obsoleted by the advance method. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com>
-
Pavel Emelyanov authored
We have pr->pe with the same data available widely, no need to copy this thing twice. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com>
-
Mike Rapoport authored
The only external users of ->seek_page method are page-xfer and uffd and both of them are anyway interested in the entire pagemap rather than a particular page. The added 'skip_zero' parameter allows proper detection of zero pagemaps by uffd. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
The return value of seep_pagemap_page can be either 1 (page found) or 0 (no page found). There's no point in checking its return value for -1. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
travis-ci: success for uffd: A new set of improvements Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
Since commit 95009c4c6d5 (criu: pagemap: introduce advance() helper for pagemap iteration) seek_pagemap_page traverses the entire pagemap, rather than starts each time from the last pagemap that was used. With large pagemaps (like, e.g. in maps05 case) the new behavior causes exponential increase in amount of calls to skip_pagemap_page for every new snapshot. Let's restore the original behavior. Fixes: #217 Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 21 Dec, 2016 15 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
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>
-
Vitaly Ostrosablin authored
By default, sockets03 doesn't set SIGPIPE handler to SIG_IGN. When run by zdtm.py, it doesn't cause problem, because it inherits signal handler. However, when run via vzt-cpt (which uses system() to launch tests), it receives default handler (which would terminate test). As result, test is guaranteed to fail, because it will attempt to write to shutdown receiver and get SIGPIPE in the face. travis-ci: success for test: Fix sockets03 default SIGPIPE handler not being set to IGN (rev2) Acked-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Vitaly Ostrosablin <vostrosablin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
A hook to cleanup test temporary files travis-ci: success for zdtm: Add binfmt_misc.hook Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
For easier debugging. v2: Forward scripts messages to criu log using cr_system travis-ci: success for scripts: Print error value in case of action script fail (rev2) Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Check that SO_PEERCRED socket options restored correctly. Now it's not supported, thus test is marked as "noauto". (It seems support of this feature will require "ghost tasks", when we introduce them). travis-ci: success for zdtm: Add sock_peercred test Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Now we remove a link_remap file when all its files are restored. It is wrong, because something else may fail and we will not be able to repeat an attempt to restore processes again. travis-ci: success for files: remove link_remaps when everything has been restored Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
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>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Starting with 4.8 the kernel doesn't allow to create inodes with a uid or gid unknown to an user namespace where a file system was mounted. 036d523641c66 ("vfs: Don't create inodes with a uid or gid unknown to the vfs") Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kir Kolyshkin authored
DESTDIR is mostly used by packagers (such as from rpm spec or deb rules), or just to try installation, and normally should be left unset/empty. Setting it to / looks weird to me. Besides, by leaving it empty we are making sure everything works if DESTDIR is not set. Fix INSTALL.md accordingly. travis-ci: success for Makefile.install: DESTDIR should be empty CC: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Now it is impossible to find when a test has been started, but sometimes we want to knwo which tests were running in a specified moment. travis-ci: success for zdtm.py: add a test name into a progress line Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Each test has a process which controls other processes and if it dies the other processes have to be killed. travis-ci: success for zdtm: exit a test if the "root" process died Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
CID 173074 (#1 of 1): Resource leak (RESOURCE_LEAK) 9. leaked_handle: Handle variable sock going out of scope leaks the handle. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Just a little optimization (one syscall less). travis-ci: success for Rectify 32-bit compatible C/R on x86 Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-