zdtm/stopped: fix stopped test

The main problem with the
test that it's never 'fail'.
Test can only 'pass' or hangs.

Signed-off-by: Konstantin Neumoin <kneumoin@parallels.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: don't create a temporary directory for pivot_root()

I found this solution in the LXC code. We can open the old root, call
pivot_root(".", "."), call fchdir to the old root and call umount(".").

Now restore will not fail, if the root is read-only.
In addition it's a bit faster.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restore: clear breakpoints only for alive tasks

We don't set breakpoints for zombies.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
check: make check_ptrace_peeksiginfo and check_sigqueuinfo as static

They are not used outside.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
dump: pre-load kernel modules

See the comment below for an explanation of what is going on. We will
ultimately need to handle dumping the netlink data, but I think it is good to
prevent injecting events into the stream during a dump. So we pre-load the
modules, even though it isn't very pretty.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
travis: add compilation of tests

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ns: Introduce ns walking helper

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: Use ns walking helper

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mnt: Clean up namespaces walking code

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mnt: Use ns walking helper

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pstree: Add helper for adding helpers to pstree

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>