zdtm: move file_locks test-cases to the common list

In this case they will be executed in other name-spaces.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
app-emu/lxc: dump/restore file locks

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: don't hardcode file names

A test should get file names from arguments

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: get a test file name from arguments

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
crtools: fix the name of --file-locks in the help message

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
tty: require stdin to be a terminal only if shell_job is set

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: add ablitiy to execute cleanout per test

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm.sh: exec cleanout per test

It's required for parallel execution of tests.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test: add ability to execute tests in parallel

All tests which executed in pid namespaces can be executed in parallel.

$ make zdtm_ns
real	0m54.806s
user	0m2.779s
sys	0m4.338s

$ make -j zdtm_ns
real	0m11.587s
user	0m3.361s
sys	0m5.134s

Another feature of this patch is that the subset of parallel tests is
executed before the subset of sequential tests.

If a first subset are not failed, the second one has a small chance to
fail, so a most part of bugs will be found in a few first seconds.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: moved lib/atomic.h to lib/arch/x86/include/asm/atomic.h

The file lib/atomic.h is the only machine-dependent file in the test suite
that breaks compilation of the test static/session01 on ARM.

The file is moved into a separate directory and the build system is modified
accordingly to prevent this.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
core.proto: added ARM-specific parts to a Core message

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
arm: added ARM-specific files modelled after arch/x86

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
make: Split long lines

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

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
make: Yield error on x86-32

Since we don't support x86-32 yet, issue an error early.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
x86: Drop #ifdef CONFIG_X86_64 guard

We do check for proper architectrue in a makefile,
no need for additional guards.

After all porting the project for x86-32 is a far more
bigger than "just implement proper core for parts covered
by #else /* CONFIG_X86_64 */".

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
protobuf: Move arch core resources to core-$(ARCH).proto

To unweave arch dependent part from general core.proto file.

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