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>
Remove space before tab characters.
Found by git grep ' ' (Space, Ctrl-V, Tab in shell).
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Remove whitespace at EOL (found by git grep ' $')
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>
readlink() does not append a null byte to buf.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
* 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>
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>
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>
Hi!
Added "has_log_level = true" to test.c, so "log_level = 4" would have effect.
Also added log_level to test.py, for symmetry with test.c.
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It was written but wasn't included into standard run because
ip tool with needed functionality wasn't available "upstream".
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Lets rename CriuDumpReq to CriuOpts, for the sake of readability and to
avoid coping code for restore mechanism, as CriuDumpReq and
CriuRestoreResp would have almost the same fields. Also, it would be
easier to introduce other types of requests.
Signed-off-by: Ruslan Kuprieiev <kurpuser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
./zdtm.sh: line 231: local: `lname,': not a valid identifier
./zdtm.sh: line 251: local: `ldir,': not a valid identifier
https://bugzilla.openvz.org/show_bug.cgi?id=2763
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>