- 12 Oct, 2015 16 commits
-
-
Andrew Vagin authored
Otherwise it's impossible to understand from which namespace this path should be opened. Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
For slave mount we need to make sure that all childrent mountpoints of the master peer is mounted before we can proceed otherwise there gonna be duplicated mountpoints after the restore. https://jira.sw.ru/browse/PSBM-39957Signed-off-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This flag means that there's lib/ directory where a plugin is. Currently rtc test is such. The wait_pid_die timeout is risen since this test dies for more than 6 seconds :) Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Sometimes tests fail before generating .out file, so print its contents only if it exists. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
I constantly have binfmt_misc off on my set ups :) Looks like this fs is far from being default for systems, so to make the test work (we plan to rewrite it anyway) let's make this fs being optional. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Hand-made list of tests is not great. As Christopher suggested we can find all executables in a directory and treat them as tests. This idea is good, but requires a little bit more trickery. First, some executables in directory are not tests, e.g. these are per-test scripts, which should be skipped. Next, not all tests in zdtm can be right now run in continuous manner (they fail), but we want to run them manually. To fix that such tests are marked with 'noauto' flag in the description. So we have the test test descriptor file, which states in which file to look for tests (executable) and which of them to exclude. Maybe more, can be added on demand. And, finally, the per-test description goes in a ${test}.desc file in native python eval/repr-able format. If the file is absent a default description is used. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The main difficulty here is that restored test becomes zdtm.py's kid and after killing one we should wait() the test's zombie. W/o the --restore-sibling test gets restored under existing init and gets wait()-ed automagically. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
In case t.kill() raises an exception (sometimes it can) it becomes unclear what's going on. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
When test is run in pseudo-container (--parallel execution) the new namespace's init is the python script itself. Thus all dying tests get reparent-ed to it and sit as zombies forever. Create pseudo-init for such containers ripping all the children. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 09 Oct, 2015 10 commits
-
-
Andrew Vagin authored
../../lib/libcriu.so: undefined reference to `strlcpy' v2: don't include string.h Reported-by: Mr Jenkins Cc: Kir Kolyshkin <kir@openvz.org> Fixes: e5654e58 ("Use strlcpy") Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
pr_perror() is special, it adds \n at the end so there is no need to supply one. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
In places where we have errno value set, such as after calling ptrace(), it makes sense to use pr_perror as it appends the errno string. This also fixes missing '\n' at the end (as pr_perror() adds it). In places where we keep using pr_err(), don't forget to have '\n'. Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Reviewed-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Don't forget '\n' when using pr_err() Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
As ptrace() sets errno, it makes sense to use pr_perror(). This also fixes the bug of missing '\n'. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
When we don't use userns, __userns_sysctl_op is called in context of the current process. A mount namespaces is restored the last one, so when we restore namespaces, we see /proc from the host pid namespace. In this case we can't use virtual pid to access /proc/pid. Let's open /proc/self/ns and use this descriptor to switch namespaces. Cc: Tycho Andersen <tycho.andersen@canonical.com> Fixes: f79f4546 ("sysctl: move sysctl calls to usernsd") Signed-off-by:
Andrew Vagin <avagin@openvz.org> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Adrian Reber authored
There are still systems which do not support dirty memory tracking. This offers an interface to query the dirty memory tracking availability via the new feature check RPC. This is in preparation of a p.haul change which will use this RPC interface to automatically detect if pre-dumps should be executed or not. This change introduces an additional optional field in the criu_request and criu_response message (features) which is a 'criu_features' message. Right now only the check for the memory tracking feature is supported in the message 'criu_features': optional bool mem_track = 1; v2: Instead of checking for memory tracking only, provide a generic interface to check for arbitrary features. v3: Do not use bitfields for feature encoding but protobuf optional message parameters. Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Matthew Krafczyk authored
This allows the user to perform actions before dumping or restoration occurs. Signed-off-by:
Matthew Krafczyk <krafczyk.matthew@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 08 Oct, 2015 4 commits
-
-
Salvatore Bonaccorso authored
Chris Lamb <lamby@debian.org> reported in Debian that criu is not building reproducible while working on the "reproducible builds" effort [0]. [0] https://wiki.debian.org/ReproducibleBuilds [1] https://bugs.debian.org/801211Signed-off-by:
Salvatore Bonaccorso <carnil@debian.org> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
sys_sigaction() returns an error code Reported-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Namespace roots might be slave ones from another namespace roots, so we should not treat them as "always ready" for mounting but rely on general logic in can_mount_now which tests slaves relations. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
When we restore sockets with relative names we change current working directory into the one provided by socket image data. This actually affects current criu state because the rest of code doesn't know about such tricks and may rely on working dir consistency. So remember the current working dir and restore it back once socket cwd operations are complete. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 07 Oct, 2015 10 commits
-
-
Tycho Andersen authored
377763e5 is incorrect since we can't always chop off the last element in the buffer: Execute static/cgroup00 ./cgroup00 --pidfile=cgroup00.pid --outfile=cgroup00.out --dirname=cgroup00.test Dump 12819 (00.003514) Error (files-reg.c:624): Can't create link remap for /dev/nul. Use link-remap option. (00.003523) Error (cr-dump.c:1257): Dump files (pid: 12819) failed with -1 (00.004042) Error (cr-dump.c:1619): Dumping FAILED. WARNING: cgroup00 returned 1 and left running for debug needs Test: zdtm/live/static/cgroup00, Result: FAIL ==================================== ERROR ==================================== Test: zdtm/live/static/cgroup00, Namespace: ================================= ERROR OVER ================================= Hopefully the >= will appease coverity (instead of just a ==). Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Adrian Reber authored
Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Such case is actually a BUG but while we can resolve the situation without real bug-on call lets walk in a gentle way. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrei Vagin authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
CID 152112 (#1 of 1): Missing break in switch (MISSING_BREAK) unterminated_case: The case for value 4 is not terminated by a 'break' statement. Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Naturally, checking strstr()+1 for NULL is useless. Reported by Coverity, CID 51594. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
It's better to 1. Use strlcpy() instead of strncpy() as otherwise we might end up with a not NULL-terminated string, which opens a portal to hell. There are a few places reported by Coverity for this, such as: - in criu_connect(), Coverity CID 51591; - in proc_pid_parse(), Coverity CID 51590; - in move_veth_to_bridge(), Coverity CID 51593; - etc. 2. Use strlcpy() instead of strcpy() to avoid buffer overruns. Some of these are also reported by Coverity, for example the one in dump_filemap(), Coverity CID 51630. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-