2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 05:18:00 +00:00

6509 Commits

Author SHA1 Message Date
Tycho Andersen
03e13d475d restore: zombies should collect their children
Consider when there is a double fork of helpers or zombies, e.g. when a
zombie has a session id which doesn't match its pid. If the child dies and
exits before the grandchild, the grandchild reparents to init, and when the
task dies init doesn't have it in the helper list, so init dies as well,
viz. the log below.

(00.118789) Add a helper 293 for restoring SID 293
(00.118792) Attach 294 to the temporary task 293
...
(01.394403)    294: Restoring zombie with 0 code
...
pie: Task 294  exited, status= 0
(01.434279) Error (cr-restore.c:1308): 12097 killed by signal 19
(01.434420) Error (cr-restore.c:1308): 12097 killed by signal 19
(01.450258) Switching to new ns to clean ghosts
(01.450324) Error (cr-restore.c:2138): Restoring FAILED.

Let's have the helpers reap their children before they exit to avoid this.

v2: block SIGCHLD when waiting on helpers so that it doesn't race with the
    SICGHLD handler
v3: * only helpers should collect their children, zombies can't have kids
    * don't double decrement nr_tasks in zombie case

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-04 17:10:14 +03:00
Pavel Emelyanov
a6c6ec89ad Remove bogus add_ns_shared_cb extern declaration
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-04 17:01:55 +03:00
Mike Rapoport
366c9131ff autofs: fix build on Fedora 22
The following error happens when building CRIU on Fedora 22:

  CC       autofs.o
autofs.c: In function ‘autofs_mount’:
autofs.c:892:9: error: implicit declaration of function ‘add_post_prepare_cb’ [-Werror=implicit-function-declaration]
   ret = add_post_prepare_cb(autofs_add_mount_info, mi);
         ^
cc1: all warnings being treated as errors

Adding forward declaration of add_post_prepare_cb resolves the issue.

Signed-off-by: Mike Rapoport <rapoport@il.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-04 17:01:53 +03:00
Stanislav Kinsburskiy
d6b97ad536 cr-restore: move add_ns_shared_cb declaration to include/namespaces.h
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-04 17:01:41 +03:00
Stanislav Kinsburskiy
7d7373a429 cr-restore: new list of ns shared objects introduced
Autofs restore needs to create some shared data structures to be able to pass
data to actual autofs master.
But on mount restore stage shared data is not configured yet.
This list of objects and their actors is processed after all mounts and shared
data are restored to let autofs to create the objects.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-04 17:01:10 +03:00
Tycho Andersen
84a89b46ad restore: correctly restore cgroup mounts inside a container
Before the nsroot= mount option, we were just getting lucky because the
cgroup superblocks "matched" when inspecting them from userspace, so we
were actually getting a bind mount from the host when migrating from within
cgroup namespaces.

Instead, let's actually do a new (i.e. not a bind mount) for cgroup
namespaces. For this, we need two things:

1. to prepare the cgroup namespace (and thus the cgroups) before the mount
   ns, so when the mount() occurrs it is relative to the right cgroup path.

2. not reject cgroup filesystems with no root. A cgroup ns mount looks
   like:

	 223 222 0:22 /lxc/unpriv /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd,nsroot=/lxc/unpriv

   i.e. it has /lxc/unpriv as its root, and thus doesn't look rooted to CRIU.
   We use the fstype->parse hook to rewrite this root to /, since it
   is handled by the cgroup ns infrastructure.

v2: add new fstype->munge hook, allowing fstypes to munge their parsed
    mountinfo entries if they want to. this allows us to get rid of the
    ugly hacks with FSTYPE__CGROUP everywhere in teh patch.
v3: s/fstype->munge/fstype->parse for FSTYPE__CGROUP

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:31 +03:00
Dmitry Safonov
870089d1ee Makefile: drop 'rebuild' from help message
The target has been broken for some time without complaints from users.
https://lists.openvz.org/pipermail/criu/2016-March/026525.html

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:31 +03:00
Cyrill Gorcunov
6094b643dc nmk: build.mk -- Add @libso-y helper
To link dynamic libs (libcompel for example).

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:31 +03:00
Cyrill Gorcunov
4a19618ea2 nmk: build.mk -- Add @hostprogs-y mode
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Cyrill Gorcunov
e4e2f19d85 nmk: msg.mk -- Add host- messages
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Cyrill Gorcunov
1693e539d5 nmk: build.mk -- Shrink gen-cc-rules
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Cyrill Gorcunov
cfc37c119c nmk: build.mk -- Drop any-match rule
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Cyrill Gorcunov
cb32e353bb nmk: build.mk -- Fix deps for target mode
Don't forget to call objectify.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Cyrill Gorcunov
cd5f7df520 nmk: build.mk -- Squash gen-rule-x into gen-cc-rules
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Cyrill Gorcunov
0d1eac7ed4 nmk: Drop rules.mk
No much point in carrying it in a separate file.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Cyrill Gorcunov
580ca3dd68 nmk: rules.mk -- Fix AFLAGS typo
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Cyrill Gorcunov
afbc03ee15 tests: remap_dead_pid[_root] -- Run in namespace only
These tests check for file descriptor being assigned
to the pid which is freed already, so check them
in PID namespace only, otherwise the kernel may
give PID someone else and the check from
commit c4cf5f0b7638a679be65b05bdb8269d34c2a4573
might trigger and stop testing procedure.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Dmitry Safonov
a8fb0b99be log: add gnu-styled output to stdout
Before this would open file named '-' as log:
./criu/criu dump -t 20526 -o -
But now it will print log into stdout. Charming.

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:30 +03:00
Andrew Vagin
08ff91d966 jenkins: build a coverage report if GCOV is set (v2)
v2: set umask to 0000. It's required to generate gcda, gcno files
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:29 +03:00
Dmitry Safonov
790957ea33 criu: use strsignal to describe kill reason
Where it's possible to use glibc.

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-01 18:06:29 +03:00
Andrei Vagin
89ba5489c4 rst-malloc: adjust free_bytes in rst_mem_align_cpos
We need to adjust free_bytes each time when we change free_bytes.

Fixes #140
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:22 +03:00
Sergey Bronnikov
12e85f1572 zdtm.py: updated logic for --keep-going option
- 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>
2016-03-25 23:39:22 +03:00
Cyrill Gorcunov
92c0e732d8 build: images -- Add missing cleanups
In commit 9469dae61c we've dropped implicit cleanups as
a pattern but in images dir we use additional custom
rules so simply drop files built.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:22 +03:00
Pavel Emelyanov
bd70812023 zdtm: Add ability to run tests from list
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>
2016-03-25 23:39:22 +03:00
Cyrill Gorcunov
06cc12a275 nmk: build.mk -- Fix ar rule for external libs
A typo.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:22 +03:00
Cyrill Gorcunov
8994edebe1 nmk: build.mk -- Make process depend on Makefile itself
If makefile is changed itself we've been not detecting it.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:22 +03:00
Tycho Andersen
10eaabd175 namespaces: zero struct ns_id when allocating
Later (find_ext_ns_id, but probably others as well) we depend on the struct
being zeroed in order to figure out whether or not to collect info about
it. Let's make sure it is actually zeroed.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:22 +03:00
Tycho Andersen
89d7579654 mount: ignore subvol argument in btrfs sb
See comment for details, but basically this mountopt can be completely
wrong in some cases.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:22 +03:00
Cyrill Gorcunov
4527341928 nmk: build.mk -- On cleanup use cleanup-y only
With cleanify helper we remove only they files
we've been generating, not anything else.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:22 +03:00
Cyrill Gorcunov
b07d304905 nmk: utils.mk -- Add cleanify helper
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:22 +03:00
Cyrill Gorcunov
6efe63109c nmk: utils.mk -- Drop redundant spaces
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:22 +03:00
Cyrill Gorcunov
95f3f22e6e nmk: build.mk -- Fix typo in gen-ar-target-rule
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Cyrill Gorcunov
7beccce4b4 nmk: rules.mk -- Add per-obj flags
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Cyrill Gorcunov
c0ba98fd30 nmk: build.mk -- Drop unused objlist target
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Cyrill Gorcunov
f4ac56c0dd nmk: rules.mk -- Drop @CFLAGS_ and @ASFLAGS_ but add ability to bring them via param
Both never worked, we need to pass them as explicit parameter.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Dmitry Safonov
7e2eee9e3c build: add mrproper target
Each time I type `make clean` and find that my tags are cleaned
and generated headers/c-files are deleted, I'm getting annoyed.
Mostly it's about protobuf images definitions.
(And then I need to run `make` and `make tags` again which
is painful).

I think, we may separate clean process on two parts, just
like it's done in the kernel (omitting distclean):
 o Cleaning all binaries/objects, but leave enough to navigate
 o Clean everything compiled/generated/etc.

In this patch pie blobs are still deleted on clean stage - I may
fix it in the later patches.
(they _should_ be regenerated on `make clean && make`)

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Dmitry Safonov
19bd013a1e build/nmk: add mrproper-y
This will separate clean process on two parts:
- deleting binaries/objects/temp
- deleting generated files

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Andrew Vagin
46e48dc168 zdtm: close __file_report before executing tests
------------------------ grep Error ------------------------
(00.011453) Error (files-reg.c:1136): Can't lookup mount=85 for fd=3 path=/var/lib/jenkins/workspace/CRIU-inhfd/test/report/criu-testreport.tap
(00.011478) Error (cr-dump.c:1304): Dump files (pid: 4) failed with -1
(00.011903) Error (cr-dump.c:1606): Dumping FAILED.
------------------------ ERROR OVER ------------------------

Cc: Sergey Bronnikov <sergeyb@openvz.org>
Fixes: c4e13bc92816 ("zdtm.py: add support of test reports in TAP format")
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Andrew Vagin
8d23e3342f jenkins: use a full name of the --keep-img option
+ ./test/zdtm.py run --all -f best -x maps04 -x cgroup02 --norst --keep always
usage: CRIU test suite run [-h] [-a] [-t TEST] [-T TESTS] [-f FLAVOR]
                           [-x EXCLUDE] [--sibling] [--pre PRE] [--snaps]
                           [--dedup] [--nocr] [--norst] [--iters ITERS]
                           [--fault FAULT] [--sat] [--sbs]
                           [--freezecg FREEZECG] [--user] [--page-server]
                           [-p PARALLEL] [--dry-run]
                           [-k {always,never,failed}] [--report REPORT]
                           [--keep-going]
CRIU test suite run: error: ambiguous option: --keep could match --keep-img, --keep-going

It worked fine without the --keep-going option.

[xemul: Remove the --keep-going and --report options, the run
        of zdtm.py is not of much interest for TAP ]

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Sergey Bronnikov
3cb39f95bb zdtm.py: add YAML block with details to a TAP report
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>
2016-03-25 23:39:21 +03:00
Sergey Bronnikov
229a6edfbd jenkins: change jenkins script to run full set of tests
add options --keep-going and --report (if it was absent)
to run full testrun with report creation

Signed-off-by: Sergey Bronnikov <sergeyb@openvz.org>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Sergey Bronnikov
1e0bc96ae8 zdtm.py: fix overall return code for --keep-going option
Signed-off-by: Sergey Bronnikov <sergeyb@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Saied Kazemi
70cb4326b6 rework criu check logic
The "criu check" command to check if the kernel is properly configured
to run criu is broken.

The "criu check --ms" command used to be the way to tell criu to check
only for features that have been merged upstream.  But recent kernels
have a set of features whose presence doesn't necessarily mean that
dump or restore will fail but rather *may* fail depending on whether
the process tree uses those features.

This patch deprecates --ms and introduces --extra, --experimental,
and --all.  See "criu --help" or "man criu" for more info.

Typical use cases are:

	$ sudo criu check
	<zero or more warnings and errors...>
	Looks good.
	$ echo $?
	0

	$ sudo criu check --extra
	<zero or more warnings and errors...>
	Looks good.
	$ echo $?
	1

	$ sudo criu check --extra
	<one or more warnings...>
	Looks good but some kernel features are missing
	which, depending on your process tree, may cause
	dump or restore failure.
	$ echo $?
	1

	$ sudo criu check --feature list
	mnt_id aio_remap timerfd tun userns fdinfo_lock seccomp_suspend \
		seccomp_filters loginuid cgroupns

	$ sudo criu check --feature mnt_id
	Warn  (cr-check.c:283): fdinfo doesn't contain the mnt_id field
	$ echo $?
	1

	$ sudo criu check --feature tun
	tun is supported
	$ echo $?
	0

Signed-off-by: Saied Kazemi <saied@google.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Andrey Vagin
69adfe7b5c zdtm: emulate a situation with invalid files in irmap cache
Fixes #134

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:36:13 +03:00
Andrew Vagin
c5880ba2cf zdtm: add post-predump hook
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:36:13 +03:00
Andrei Vagin
c5c5434506 fault: add ability to fault open_by_handel in check_open_handle
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>
2016-03-25 23:36:13 +03:00
Sergey Bronnikov
84359f7a10 zdtm.py: change format of test description in TAP report
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>
2016-03-25 23:36:13 +03:00
Andrew Vagin
bb2f97e663 libnetlink: back port a fix for nlattr_parse()
The bug was fixed in libnl-3 3.2.24, but
rhel7 and the Trusty ubuntu don't update this packet yet

commit b50a36bf34e7452377ab9bbb4d1873b68c65bf72
Author: Samuel Gauthier <samuel.gauthier@6wind.com>
Date:   Fri Nov 29 09:28:44 2013 +0100

    The commit 6a8d90f5fec4 "attr: Allow attribute type 0" intended to
    allow the parsing of {netlink,packet,unix}_diag, even if they are
    using type 0 for valid attributes.

    It lacked this part in nla_parse.

    Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
    Signed-off-by: Thomas Graf <tgraf@suug.ch>

Fixes #137

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:36:13 +03:00
Sergey Bronnikov
cabafae2e5 zdtm.py: add support of test reports in TAP format
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>
2016-03-25 23:36:13 +03:00
Sergey Bronnikov
474f2dfc5d zdtm.py: add option --keep-going
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>
2016-03-25 23:36:13 +03:00