- 26 Oct, 2015 10 commits
-
-
Andrew Vagin authored
5468 semctl(0, 1, IPC_SET, 0x7ffd25bcb590) = -1 EINVAL (Invalid argument) Reported-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrew Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Name with up to UNIX_PATH_MAX in length is allowed value. Reported-by:
Nikita Spiridonov <nspiridonov@odin.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Every print_on_level() injects timestamp, better to print it in one pass for readability. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Sometimes pr_perror() is used in places that don't have errno set. In such places, pr_perror() should not be used as it will print some nonsense. Introduce and use pr_err() for such cases. Now, I see sometimes fail() is used in such cases but I think it is reserved for places where test fails (rather than there is something that prevents the test from working). Also, sometimes test_msg() is used but it doesn't print source file name and line number. If there will be a need, we can unify pr_err() with say fail(), it will be easier to do after this patch. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Andrew Vagin <avagin@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
In this place, errno is not being set and can be 0 or some random value, so we should not use it. In case errno happens to be 0, we end up returning a success status from a function while we should have returned a failure. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Andrew Vagin <avagin@gmail.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@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Log function pr_perror() automatically adds - numeric errno value - string errno value (aka strerror(errno), aka %m) - a newline So, its callers don't have to do all these things. While at it, also - fix or improve some message texts - replace fnprintf() with pr_perror() Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Andrew Vagin <avagin@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
In (highly unlikely) case localtime() failed, test_msg() calls pr_perror() which is a wrapper around test_msg() so we're calling ourselves, which can lead to infinite recursion if localtime() keeps failing. Use fprintf() here to avoid this. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Andrew Vagin <avagin@gmail.com> 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>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 21 Oct, 2015 9 commits
-
-
Kir Kolyshkin authored
Signed-off-by:
Kir Kolyshkin <kir@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
We gonna need it for inotify handle testing. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Reported-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Contrary to a popular opinion, there is no need to check an argument for being non-NULL before calling free(). >From free(3) man page: > > If ptr is NULL, no operation is performed. Let's change xfree macro to be a synonym for free(). Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
In debian-8 container we faced the problem -- systemd creates nested mount namespaces and inotify watchee are resolved into a path which is inaccessbile on restore, the same happens when pathes where watchees are living are bind-overmounted. Thus when we try to restore such watchees we can't open the paths. Lets do a trick here (thanks a huge to Andrew Vagin for idea and overall help) -- walk over all mount points which device match the handle's device and open handle first and test if the path provided is openable as well for tmpfs and devtmps which do not save inodes between remounts. After all the inotify objects are bound to inode so it's irrelevean via which path it's assigned. https://jira.sw.ru/browse/PSBM-39957Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
There is an another err() in glibc Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
err() adds %m and \n at the end 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>
-
- 20 Oct, 2015 6 commits
-
-
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
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>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 19 Oct, 2015 15 commits
-
-
Andrew Vagin authored
OpenVZ creates per-container kernel threads and they live in container's cgroups. CRIU should skip these threads, it's impossiable to get any state of them. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.org> Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This patch(set) is inspired by similar from Andrey Vagin sent sime time earlier. The major idea is to artificially fail criu dump or restore at specific places and let zdtm tests check whether failed dump or restore resulted in anything bad. This particular patch introduces the ability to tell criu "fail at X point". Each point is specified with a integer constant and with the next patches there will appear places over the code checking for specific fail code being set and failing. Two points are introduced -- early on dump, right after loading the parasite and right after creation of the root task. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This option cannot be tested using classic zdtm tests as it implies some data created before restore and passed through criu restore down to the restored process (descriptor in our case). So add inhfd_test class that creates such. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
One for checkpoint another for restore. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
We don't check the return value here, so let's return void. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
As of https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fb7589a1 tun support is merged, so let's check it in ms as well. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
As of https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5442e9fbd this feature is in mainline, so let's check for it in ms. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
As of https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=49d063cb3 the mnt_id field is in mainline, so let's check for it in --ms. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
The /dev/rtc device major value may change depending on the architecture, and kernel release. To ensure the test rtc is working all the time, we no longer belong on hard coded major value but peek it from /dev/rtc itself. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
Since crtools is no more linked with object build for the parasite/restorer blob, it no more needs the builtin memory services. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Tree ways are possible -- always, never and only for tests that failed. The latter one is the default. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
This class is essentially libcriu in python(yet for now it has only some basic functions such as check/dump/restore). It is needed to make life for python users even more easier, i.e. hiding some nasty connection stuff. It is also using criu swrk(COMM_BIN) communication method, instead of an old system service, as we no longer recommend it. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
1. As pointed out by Coverity (CID 114629), mnt_ns_fd is closed, but then the function calls try_clean_remaps(mnt_ns_fd) which tries to close the file descriptor which is already closed. To address this, let's use safe_close() which sets closed fd to -1. As it also checks its argument, there's no need for explicit check so let's remove "if" check before close(). 2. As Pavel pointed out, "calling the whole try_clean_remaps() is not required once we've passed the cleanup_mnt_ns() point". This could be addressed by introducing yet another label, but it's cleaner to just use a flag variable. Note that since the second issue is being addressed, the first one goes away, but let's keep the fix for it anyway, it might help in the future. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-