parasite: Cleanup args size fetching

Right now we push all the auxiliary arguments to parasite_infect_seized
while 2 of them are only required to calculate the size of args area.

Let's better keep track of required args size and get rid of excessive
arguments to parasite_infect_seized().

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ns: Rename "created" futex and comment what it is

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ns: Factor out nsid listing code

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ns: Don't do manual lookup_ns_by_id

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
userns: Don't fork task not to dump userns

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
zdtm: compare file descriptors only for static tests

For other tests set of file descriptors can be changed

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: add transition/fork2 in the test list

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm/fork: create 10 process concurrently

Currently this test creates one process and wait it. So most part of the
time this test has only one process without children.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
kerndat: Collect all global variables on one struct

Not to spoil the global namespace and unify the kerndat
data names.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
kerndat: Make fs-virtualized check report yes/no

Right now it returns the whole struct stat which is excessive.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
kerndat: Handle errors from devtmpfs virtualized checks

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
kerndat: Sanitize the get_fs_stat internals

Keeping the whole stat buf it too much information.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
collect: Clean children and threads recurring collect checks

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
collect: Clean children collect code variables usage

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
collect: Move parse_threads into collect_threads

To make the threads collect code be structured similar to
children collect. This will also help in further patching.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
collect: Factor out recurring collection of threads and children

We scan threads and children list several times while freezing
the tree, this is done to avoid race with new threads/kids
appearing.

Factor out the iterations code.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
collect: Don't check for zombie before collecting

We have sanity check for zombie-with kids below, no
need in additional.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
collect: Rename children/threads collecting routines

Make their name look similar.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: Don't test userns tests if no required APIs found

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
proc_parse: Convert parse_pid_status to BFD engine

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>