Here is a regresion test cae for
commit 1934e1a963
Author: Andrey Vagin <avagin@openvz.org>
Date: Tue Feb 18 16:53:00 2014 +0400
posix-timer: take into account that sival_ptr can be NULL (v3)
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Use maps04, on tmpfs, check if size of pages image is zero in the end
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Use futex for synchronization instead of spinning on atomic variables.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Currenty a parent can go far away from child and we will need to wait
too long for checking results.
This pach limits delta to [MIN_DELTA, 2 * MIN_DELTA].
Thi patch should fix current errors for the CRIU-iter job in Jenkins.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ARCH is a user-facing variable and setting it on the command line
clobbers any manipulation attempted in the makefile. Following
the example of the Linux kernel makefiles, use a SRCARCH variable
instead for the internal, potentially fixed-up, architecture name.
This fixes the following error.
make ARCH=x86_64
Makefile:69: *** "The architecture x86_64 isn't supported". Stop.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
When a process is started in a new pid namespace, the init process must
colleck zombies.
But before this the init process must waits the root test process, which
returns a status of preparation stage.
Currently these two operation can race, because the both ones call waitpid().
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We don't need to wait if a stop signal has been received.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This test fails when run in ns:
(00.300947) 1: Error (util.c:568): exited, status=1
(00.300964) 1: Error (cr-restore.c:1067): 5 exited, status=1
(00.300989) 1: Error (mount.c:637): Can't restore tmpfs content
(00.301005) Error (cr-restore.c:1602): Restoring FAILED.
Reason for failure -- tar is spawned in new mount namespace where
it can not be found (bug #2870).
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This test does a few operation in a loop
* create a mapping with random flags
* touch a few pages in a new mapping, if it's writable
This test has two processes. The second process goes a predefined value
of steps behind the first one. When we need to check the result, we stop
the first process, wait until the second process come to the same point
and compare these processes. The processes are dumped in different
states, but at the end both processes must be in the same state.
bash -x test/zdtm.sh -s -i 5 -r transition/maps007
...
(00.743662) Error (page-read.c:107): Missing 139773474525184 in parent pagemap, current iov: base=7f1f8c4cf000,len=4096
(00.743696) Error (page-xfer.c:523): Hole 0x7f1f8c4c5000/4096 not found in parent
(00.744196) Error (mem.c:331): Can't dump page with parasite
(00.758201) Error (cr-dump.c:1828): Dumping FAILED.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
verify decline in size of second parent-level image file
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
check if size of second parent-level image become smaller
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It's useful, if you like execute bash -x zdtm.sh.
zdtm_sep isn't interesting for debugging needs.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It's ugly but should work for now. Strictly speaking
I need to rework the complete make engine used in
zdtm.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Tested-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
./test/zdtm.sh -i 2 -P ns/static/env00
v2: make the help message a bit more detailed
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We have a big mistake in how we track for ptes to be SOFT_DIRTY -- no
need in these checks if the --track-mem is not given.
While fixing this, remember proper checks for the kernel memory tracker.
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reported-by: Tim Schürmann <info@tim-schuermann.de>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
These files doesn't have own rules
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Acked-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Broken by my commit 1fa0c0c05. I swear I was not drunk.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Use true instead of echo >/dev/null -- same effect, less bytes.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
When running 'make clean' from the top dir, the following error happens:
make[3]: Leaving directory `/vz/kir/git/criu/test/zdtm/live/static'
make[2]: Leaving directory `/vz/kir/git/criu/test/zdtm/live'
set -e; for d in lib live; do make -C $d cleanout; done
make[2]: Entering directory `/vz/kir/git/criu/test/zdtm/lib'
make[2]: *** No rule to make target `cleanout'. Stop.
make[2]: Leaving directory `/vz/kir/git/criu/test/zdtm/lib'
make[1]: *** [cleanout] Error 2
make[1]: Leaving directory `/vz/kir/git/criu/test/zdtm'
make: *** [clean] Error 2
Fix by adding dummy cleanout target to test/zdtm/lib/Makefile
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Makefile is locked, because tests can be executed concurrently.
v2: return non-zero code
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
make ZDTM_ARGS="-C -i 2" -C test/ zdtm_ns -j 8
make is able to execute tests concurrently.
Now we can customize execution of tests
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
First of all, silly-rename files' names may change, so
kludge the fds comparison properly.
Other than this, allow for linked-remaps on write_read10
test as it effectively generates such on NFS.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
One note -- the macvlan's index _does_ change. We should
either patch iproute2 or use raw kernel API to preserve it.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The timeout can be exceeded during dumping and restoring.
When we are testing snapshots, the test is dumped three times.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Remove whitespace at EOL (found by git grep ' $')
(the character before $ is real tab, typed in shell using Ctrl+V Tab)
To people using vim, I'd suggest adding the following code to ~/.vimrc:
let c_space_errors = 1
highlight FormatError ctermbg=darkred guibg=darkred
match FormatError /\s\+$\|\ \+\t\|\%80v.\|\ \{8\}/
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Here are client, server programs and two libraries for dumping client
sockets and syslog socket.
The client can ask server to save a value and then request it later.
We suppose that after dumping and restoring the client will get
the same value.
So the dump callback requests the value and save it in a file.
The restore callback creates a new socket and ask server to save the
value from the file.
v2: open a syslog socket
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
A thread can create another threads, if the number of threads is less
than the limit.
This test case is very useful to check criu freezer.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
add auto-dedup when dumping the last time, and check if size become smaller
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
if size become smaller and restored ok, then test passed
use mem-snap.sh
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This test is similiar to test/rpc, and can also be used as an
example of using libcriu.
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We sometimes want to exclude several tests from run. Writing
expression with \-s is annoying. Let's make it possible to
do several -x's instead.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>