cr: don't compile the suite for an unsupported architecture

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
multiarch: removed target architecture checks from the following files:

* include/image.h,
* include/syscall-types.h,
* include/restorer.h,
* parasite-syscall.c,
* cr-dump.c,
* cr-show.c,
* pie/parasite.c.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
parasite-syscall.c: introduced the macro ARCH_SI_TRAP

The macro is introduced to abstract from behavior of breakpoints:
they generate different values of the field siginfo.si_code on different architectures.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
parasite-syscall.c: introduced the macros REG_RES and REG_IP

The macro REG_RES is to be used to access the syscall return value register
in the struct user_regs_struct_t.

The macro REG_IP is to be used to access the program counter register
in the struct user_regs_struct_t.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restorer: introduced the macro RT_SIGFRAME_UC to access the user context of a sigframe

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restorer: introduced the macro SIGFRAME_OFFSET

The macro is designated to tune the beginning of a sigframe on different architectures.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
core: introduced the macro CORE_ENTRY__MARCH to represent the target architecture

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cr: use unsigned long type for integers representing a virtual address

This patch is intended to reduce the usage of the macro P() since
integer size mismatches sometimes may be fixed by this type generalization.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
image.h: moved the macro AT_VECTOR_SIZE to the file asm/types.h

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
parasite-syscall.c: moved the function mmap_seized() to the file arch/x86/crtools.c

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
log: Beautify log.h

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
log: Make pr_err_once to use pr_err

No need for core duplication.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
log: Add generic __print_on_level helper

It accepts va_list argument and suitable to
be wrapped with another helpers.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm.sh: fix absolute path to crtools

zdtm.sh launched by an absolute path exits with an error due to
an incorrect path to crtools

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: remove mentions of test_init

test_init was removed a long ago

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: compile a test before constructing a new root

A binary is required to get shared library dependencies

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm.sh: use another directory for a temporary crtools tree

It's more convinient for a few reasons
* don't need to recompile sources for each test case
* don't change the current tree

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm.sh: execute all zdtm test case for a defined commit

This functionality can help to test a patch set:
for i in `git rev-list HEAD~15..HEAD`; do
	./test/zdtm.sh -c $i || break;
done

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
core: introduced the macro CORE_THREAD_INFO to access the machine-specific part of CoreEntry

This is the merge and a slight rework (no TI_SP macro) of Alexander's patches
about the subj.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: added target architecture checks into FPU tests

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Acked-by: Andrey Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>