join-ns zdtm test will skip ns and uns flavors, and
some socket related test, too. Because join-ns test will
try to join an existing network namespace.
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Now we don't detect extra mounts, if they have peers with the same root
and target paths.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Jenkins sends this files as a message body if something failed.
Cc: Sergey Bronnikov <sergeyb@openvz.org>
Fixes: 474f2dfc5dd4 ("zdtm.py: add option --keep-going")
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
We expect:
- all 9 scripts are called
- there's always images dir variable
- for 7 of those scripts there's root-pid variable
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
- option --keep-going is not mandatory if we run a single testcase
- show warning when we use --keep-going with a custom set of testcases
- ignore --keep-going when we run a custom set of testcase (exit on 1st fail)
Signed-off-by: Sergey Bronnikov <sergeyb@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Sometimes when running tests manually it's tempting to
prepare the list of tests to run in advance and then
run only those. E.g. -- when testing a new feature
that affects only _some_ tests. This option allows it.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
It was requested by Andrey.
This patch adds details about failed testcase to a TAP report:
TAP version 13
1..1
not ok 1 - zdtm/static/deleted_unix_sock # flavor h
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
From code coverage report, we found that inotify_irmap doesn't test irmap
cache, because we is always able to resolve path from /proc/PID/fd/X.
Current view: top level - criu - irmap.c (source / functions) Hit Total Coverage
Test: criu.info Lines: 40 223 17.9 %
Date: 2016-03-16 Functions: 4 13 30.8 %
This series introduces a new fault to emulate a situation
when a file can't be opened by handle and we have to find
it in the irmap cache/
It's required to test irmap cache. I don't know how to force it
without this patch. Each time when a file can be opened by handle,
its path can be resolved via /proc/PID/fd/X.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
changed per request from Andrey Vagin
Signed-off-by: Sergey Bronnikov <sergeyb@openvz.org>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Usually we run CRIU tests automatically using Jenkins CI and it reports status
as PASS/FAIL for overall testsuite on used environment. You should dig into log
files to figure out how many tests were failed and skipped. This patch brings
support of cute reports in TAP (Test Anything Protocol) format.
The sample of report:
TAP version 13
1..242
ok 1 - conntracks # SKIP manual run only
ok 2 - busyloop00
ok 3 - sleeping00
ok 4 - pid00
ok 5 - caps00
ok 6 - wait00
NOTE: report will be generated only when options --keep-going and --report
are specified.
Signed-off-by: Sergey Bronnikov <sergeyb@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Introduce an option --keep-going to make ability to run all planned tests and
ignore failed tests. Also with this option zdtm.py will keep image files and
output log for each failed test:
[vagrant at fedora test]$ find sergeyb-xxx -maxdepth 3
sergeyb-xxx
sergeyb-xxx/zdtm_static_bridge_ns
sergeyb-xxx/zdtm_static_bridge_ns/images
sergeyb-xxx/zdtm_static_bridge_ns/images/1
sergeyb-xxx/zdtm_static_bridge_ns/output
sergeyb-xxx/zdtm_static_bridge_ns/images.0
sergeyb-xxx/zdtm_static_bridge_ns/images.0/1
sergeyb-xxx/zdtm_static_bridge_ns/output.0
sergeyb-xxx/zdtm_static_deleted_unix_sock_h
sergeyb-xxx/zdtm_static_deleted_unix_sock_h/output
sergeyb-xxx/zdtm_static_deleted_unix_sock_h/output.0
sergeyb-xxx/zdtm_static_deleted_unix_sock_h/output.1
Signed-off-by: Sergey Bronnikov <sergeyb@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
These tests do some work while being C/R-ed, so it make sense to
let them do some progress before doing so.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
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>
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>
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>
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>
I suggest to inject a fault and than try to execute the same command
again without a fault to check that it will complete successfully.
v2: skip a parasite blob when we are checking vma-s
v3: remove a loop for two iterations
v4: clean up
v5: call fault hooks from one place
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
In Ubuntu flock opens a file with O_RDWR and then it can't be executed
flock: ./zdtm_mount_cgroups: Text file busy
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Tests are often run in VMs and 5 seconds on loaded environments might
be not enough to catch transition zdtm tests.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Move static and transition into zdtm top. We can't move all the micro
tests themselves, as we need to distinguish static from non static (zdtm.py
makes additional checks on static ones).
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Fix checkskip logic, also emit a clearer reason when checkskip fails as to
why the test was skipped.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Depending on the distribution, binaries or shared libraries a test is
dependent of may not be stored at the same place.
This patch introduces the ability to define option in the dependency
list, by separating the optional target names by a '|' character.
For instance the dependency of test may be described this way:
{'flavor': 'ns', 'deps': [ '/bin/foo|/usr/bin/foo' ], 'flags': 'suid'}
Note, there shouldn't be any spaces around the '|'.
If none of the optional dependency is satisfied, an error is raised.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Some tests require criu to be root, e.g. tcp tests of unlink-mmaps ones,
so mark those in desc files as such.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Looks-good-to-me: Andrew Vagin <avagin@virtuozzo.com>
There are several restrictions:
1. Onlu dump is checked (--norst) for now
2. Only host flavor as tests has to start themselves in non-root mode
3. Only non-suid tests
4. TCP doesn't work too, should be manually excluded :\
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Looks-good-to-me: Andrew Vagin <avagin@virtuozzo.com>
Now we save files, maps and mounts for each test process
and we need to compare them separately for each process.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
In this case it has an external master_id and we want to test that
criu can handle it correctly.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>