dump: fix parsing of /proc/locks

is_blocked should be determined for each line independently.

For example:
1: POSIX  ADVISORY  WRITE 1974 fd:01:392012 0 EOF
2: POSIX  ADVISORY  WRITE 1974 fd:01:392011 0 EOF
3: POSIX  ADVISORY  WRITE 1698 fd:01:1196619 0 EOF
4: POSIX  ADVISORY  WRITE 1698 fd:01:1196620 0 EOF
5: POSIX  ADVISORY  WRITE 1698 fd:01:1196621 0 EOF
6: POSIX  ADVISORY  WRITE 1689 fd:01:1429204 0 EOF
7: POSIX  ADVISORY  WRITE 1690 fd:01:1429202 0 EOF
8: POSIX  ADVISORY  WRITE 1690 fd:01:1429201 0 0
8: -> POSIX  ADVISORY  WRITE 1701 fd:01:1429201 0 0
9: POSIX  ADVISORY  WRITE 1688 fd:01:1429206 0 EOF
10: FLOCK  ADVISORY  WRITE 1694 fd:01:1196520 0 EOF
11: POSIX  ADVISORY  WRITE 862 00:0f:12421 0 EOF
12: POSIX  ADVISORY  WRITE 846 00:0f:12377 0 EOF
13: FLOCK  ADVISORY  WRITE 821 00:0f:11378 0 EOF
14: POSIX  ADVISORY  WRITE 459 00:0f:9826 0 EOF
15: POSIX  ADVISORY  WRITE 511 00:0f:10413 0 EOF

Without this patch crtools returns the error:
(00.000613) Error (proc_parse.c:1089): Invalid file lock info!

It's because is_blocked is set in "true" for the line 8 and
it becomes "true" for the line 9.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: Unlink link_remap files once dump complete

In case if only "dump" procedure is invoked we left service
"link_remap.%d" file(s) on disk. This prevents next "dump"
procedure of same test to fail because we hit the situation
where same named "link_remap.%d" already exist.

So, if test is passed with "-d" option we remove the link remap
file at the end.

Also with this patch we start passing --link-remap option
only for tests which have "unlink_" prefix in name. This applies
some limitation on how test could be named, thus maybe we need
more flexible solution here.

https://bugzilla.openvz.org/show_bug.cgi?id=2489

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
make: pie -- Add generation of dep files

Otherwise pie may not be re-built if headers
are changed.

https://bugzilla.openvz.org/show_bug.cgi?id=2465

Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: Add mmap03 test case

To be able to test it one need indeed enough
physical memory on the node (at least 16G).
Thus I don't include this test for regular
passes.

Inspired by commit 40dcaf885eaf3f2f51d08ecb6c18c3f948655c6e

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
sockets: Print which socket family is unsupported

It's good to know which family we've met.

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

We don't use it at all.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
make: Use -f option for rm

Otherwise I'm getting warnings (especially in zdtm)
when we are trying to remove non-generated .d files.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
dump: Make sure we're not dumping unsupported task

In case if we're going to dump x86-32 task on x86-64
node we will receive illegal operation signal, because
we don't support x86-32 tasks at all. So report problem
early.

https://bugzilla.openvz.org/show_bug.cgi?id=2505

Reported-by: Ashish Bijlani <ashish.bijlani@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Andrey Vagin <avagin@openvz.org>