First -- set cannot be made out of lists (and maps lists contain lists of pairs)
Second -- it is much better to read map diffs in hex, rather than ints (as they
would be if repr-ed by default)
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Now zdtm.py can construct an report which contains all required
inforamtion for investigating a problem. This patch adds support
of this functionality to jenkins scripts.
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It allows to execute zdtm.py not only from the test directory.
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This script prepares the cgroups hierarchies that are used by
tests to avoid creation of those in parallel with tests, that
do not expect them to appear.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We clean up test files from Makefile.
The name format for them is testname.XXX.test.
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Includes C/R images dir and the zdtm.py logs for one test only.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@odin.com>
After this patch it stops working in zdtm.sh launcher duo to incomplete
root constructed. Do we want to fix it?
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Things added are:
1. /usr directories (links to respective / ones)
2. /sbin dir
3. per-test dependencies that are listed in .desc file as 'deps': [<list>]
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
fail() saves all files in an archive for further investigations.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Current implementation of print_sep has off-by-one-like issue -- it
can print one character more :) Fix this and make the code shorter.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
There is no permissions to set sysctl-s
v2: add the suid flag
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We don't have enough permissions to set sysctl-s from userns, while
system calls are ns_capable()-protected in the kernel and thus work
in user-namespaces.
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
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>
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>
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>
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>
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>
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>
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>
As our tests serve as an example for people on how to preferably
use criu, we need to also switch to swrk.
Signed-off-by: Ruslan Kuprieiev <rkuprieiev@cloudlinux.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>