debug
test/mountpoints: clean up

All mounts is marked as private for one call, so we don't need the
variable private, which has been added in "(55fe0939088d) zdtm: don't
destruct an external mount-namespace"
last_ack
socket-tcp-syn-sent
tcp: restore sockets in the syn-sent state

For that we transfer socket in nonblocking mode, set sequence numbers,
disable repair mode and call connect(), which is returned EINPROGRESS.
zdtm: rollback cwd only if a test case is executed in namespaces

$ bash test/zdtm.sh -i 0 '\(ns/static/env00\|static/pty03\|static/mountpoints\)'
...
==================================== ERROR ====================================
Test: zdtm/live/static/mountpoints, Namespace:
Output file: /root/git/1/criu/test/zdtm/live/static/mountpoints.out
------------------------------------------------------------------------------
00:53:03.267: 26935: FAIL: mountpoints.c:139: Can't umount all the filesystems (errno = 16 (Device or resource busy))
------------------------------------- END -------------------------------------
================================= ERROR OVER =================================

Fixes: 0198590c5a44 (zdtm: Factor out starting the test via Makefule)
Signed-off-by: Andrey Vagin <avagin@openvz.org>
mount: execute collect shared for all mounts

Current on dump it is executed for each namespace, so we can skip
dependencies between namespace. For example we can have two namespaces.
The first one contains a tmpfs mount and the second one contains a
non-root bind-mount of this tmpfs. Without this patch this example can't
be dumped.
mount: save remapped links on tmpfs

For that mnt namespaces should be dumped after files.
mount: don't set m->bind if m is already mounted

m->bind will be used to get the lowest mount
mount: save the origin mount point path on restore
mount: add helper mntns_get_root_by_mnt_id
link-remap: open link-remap files from correct mountpoints

Here is a problem with ghost files. Links are created on restore, but
they can't be created on any mount point, because a mount point can be
non-root bind-mount of another one. So we need to find the root mount
and create all links there.
notify: open files form a correct mount points
file: use ralative path for retoring files

openat() is used to open files, so absolute pathes can't be used
[PATCH] zdtm: Check that files from alien mnt ns are handled (v2)

Check that files opened before switching to new mount namespace
remain in it after restore. Right now this is not so :( Andrey is
fixing the issue.

Christopher, can you check whether the ns_child's call to system()
works in your minimal set-ups (it launches cat and awk). If not,
then I should rewrite this routine in pure C.

The first version was written by Pavel (xemul@).

v2: don't use test_init_ns
    don't call awk and cat
zdtm: check link-remap and ghost files from a few mntns