crtools: include sys/time.h in parasite.h

This patch fixes an error:
In file included from mem.c:10:0:
include/parasite.h:116:19: error: field ‘real’ has incomplete type
include/parasite.h:117:19: error: field ‘virt’ has incomplete type
include/parasite.h:118:19: error: field ‘prof’ has incomplete type

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
crtools: don't include crtools.h in other headers

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
crtools: remove extra headers from headers

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
crtools: move cr_options in a separate header

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
log: move print_*data from crtools.h in log.h

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
crtools: move pid_rst_prio to pid.h

crtools.h is too heavy to be included in many sources

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
hdrs: delete extra headers from image.c

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
hdrs: minor cleaup

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
lib: Don't compile-in util-fd.c

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: use full paths in commands and log messages

I like copy past. Currently zdtm.sh uses paths relative to the
directory test, but I work ralative to the root of the source tree.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: show logs only in verbose mode

It's may be useful for Jenkins or other auto executors, but human would
prefer to open log file in text editor rather than scroll a terminal
history.

The error message in non-verbose mode contains only critical information
such as error messages and paths to log files.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: improve printing of separator lines

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: suppress the message "Nothing to be done for 'all'"

Execute zdtm/live/static/env00
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all'.
./env00 --pidfile=env00.pid --outfile=env00.out --envname=ENV_00_TEST
Dump 18232
Restore
Check results 18232
14:53:59.615: 18232: PASS
Test: zdtm/live/static/env00, Result: PASS
ZDTM tests PASS.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test/rpc: fix test execution

* fix compilation from the test/rpc directory

$ make
make: *** No rule to make target `/rpc.proto', needed by `rpc.pb-c.c'. Stop.

* use absolute path for pidfile

$ bash run.sh
**************************************************
		Shutdown service server
**************************************************

cat: pidfile: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ...
or kill -l [sigspec]

Cc: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pstree: don't include restorer.h in pstree.c

restorer.h includes about 20 headers. Any changes in these headers
provoke to recompilation of pstree.c.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: Don't create lo on netns restore

For devices, that are available in netns we have a special
routine, that just restored link params.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restorer: Make task- and thread- args go one-by-one

Currently we have task args page-aligned, then there go
thread args. This is waste of memory. Let's put them in
one row.

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

Remove the _core_ from it.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
rst: Initialize task restore args after rst-mem remap

The plan is to move the args on rst-mem itself. Thus we need
to make sure it's initialized _after_ remap into restorer space.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
rst-mem: Grow buffer more than 2 pages if required

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