2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-26 11:57:52 +00:00

1777 Commits

Author SHA1 Message Date
Andrey Vagin
ebb8066599 zdtm: fix adding test cases to the list
bash returned the error : No such file or directory
and doesn't add three test cases to the list.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-21 12:05:29 +04:00
Evgeny Antyshev
d25f5348ae zdtm: uptime_grow test
new testcase important for rebootless update testing:
we query system timer CLOCK_MONOTONIC continuously
and fail in case it stepped backwards

Signed-off-by: Evgeny Antyshev <eantyshev@parallels.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-20 15:02:53 +04:00
Andrey Vagin
606ad446ec zdtm.sh: execute all test in NEW_PIDNS in addition (v2)
Now the most part of test cases may be executed in pidns.
By default all test cases are executed in current pidns, then
they are executed in new pidns again.

v2: remove the hard coded path to  test_init

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-19 22:19:34 +04:00
Andrey Vagin
d4a5938d8f zdtm: add a test init for executing tests in PIDNS
Add a small program, which clones a process in new PIDNS and executes
a test.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-19 22:18:23 +04:00
Cyrill Gorcunov
3eade0b6d5 zdtm: ipc_namespace -- Make sure queues_max is not out of range value
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-19 13:24:46 +04:00
Victor Konyashkin
e2ba4892ca zdtm: If address already in use then need increase port.
If address already in use then need increase port.
The problem occured because the socket_listen.c и socket_aio.c
can try to use the same address.

Signed-off-by: Victor Konyashkin <vkonyashkin@parallels.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-19 12:44:53 +04:00
Andrey Vagin
ad41b1e9c9 zdtm:fifo: check that read only fifo descriptor is restored
* Create fifo and two descriptors rw and ro
* Write data and close rw descriptor
* Suspend/resume
* Read data from ro descriptor

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-19 12:40:51 +04:00
Andrey Vagin
542abe80a2 zdtm:fifo: write a few data in the fifo descriptor and check them
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-19 12:39:58 +04:00
Cyrill Gorcunov
b6b9e8dc6d zdtm: Cleanup file_fown test case (v2)
- add test for flags recovery
 - drop sockets, not needed
 - simplify test for owners and signumber

v2: remove polling (by avagin@)

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-06-04 12:38:32 +04:00
Cyrill Gorcunov
9589932561 zdtm: Add sockets_dgram test case
Code to test unix dgarm sockets (extracted from
previous sockets00 test case).

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-31 15:12:15 +04:00
Cyrill Gorcunov
96c3c7bea4 zdtm: Add sockets_spair test case
Code to test socketpair (extracted from
previous sockets00 test case).

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-31 15:11:56 +04:00
Cyrill Gorcunov
7dad6fcfdf zdtm: Cleanup sockets00
Don't mix various types of sockets in a single
test case, in case of problems it become harder
to fins which kind of socket failed.

The removed test cases will be addressed in
further patches.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-31 15:11:54 +04:00
Victor Konyashkin
a72fd71e7f zdtm: Need increase buffer in msgque.c to avoid overflow
Need increase buffer in msgque.c to avoid overflow via memcpy,
because now mtext[20] less than ANOTHER_TEST_STRING "Yet another test sysv5 msg".

Signed-off-by: Victor Konyashkin <vkonyashkin@parallels.com>
Acked-by: Andrey Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-30 12:47:12 +04:00
Victor Konyashkin
fc8c66c629 zdtm: Need add -Wno-unused-result option lib and static Makefile
It's need to add -Wno-unused-result option to lib and
static Makefile to avoid errors like:
msg.c:58:8: error: ignoring return value of 'write', declared with
attribute warn_unused_result [-Werror=unused-result]

Signed-off-by: Victor Konyashkin <vkonyashkin@parallels.com>
Acked-by: Andrey Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-30 12:46:23 +04:00
Viktor Konyashkin
66a7f1a3df zdtm: open with O_CREAT in second argument needs 3 arguments
The mode argument must be supplied when O_CREAT is specified in flags.
Otherwise it will cause compile error due to -Werror is specified.

Signed-off-by: Viktor Konyashkin <vkonyashkin@parallels.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-30 12:45:19 +04:00
Andrey Vagin
168b7ca7a2 zdtm: remove extra code from file_fown
The testcase is buggy -- the signal is delivered _before_ we checkpoint
and restore it, thus it checks nothing. But after the fix test fails,
due to bug in fowners restore. Will fix it later.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-30 12:43:38 +04:00
Andrey Vagin
b026e59c43 zdtm: initialize shared memory before fork
Otherwise this memory are initialized from parent and child,
but parent may initialize, when a child has written a useful data.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-30 12:41:16 +04:00
Andrey Vagin
ba61f94646 zdtm: set SA_RESTART for SIGIO in file_fown
Otherwise waitpid returns -EINTR and the test case fails.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-30 12:40:55 +04:00
Andrey Vagin
6fd82bf702 zdtm.sh: check that a pid is valid
A test process should be alive.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-12 16:25:39 +04:00
Andrey Vagin
ef1c6035f1 zdtm: don't show a wrong path to log files
It showed old pathes.

Dump log   : /root/crtools/test/dump/inotify00/15673/dump.log
Restore log: /root/crtools/test/dump/inotify00/15673/restore.log
Output file: /root/crtools/test/zdtm/live/static/utsname.out
make: *** [test] Error 1

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-12 16:25:18 +04:00
Andrey Vagin
a67d0cb25a zdtm: add gitignore
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-12 16:21:47 +04:00
Andrey Vagin
9fc24621d5 zdtm: delete an unused file
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-12 16:17:12 +04:00
Andrey Vagin
f53888480e zdtm: open log files with O_APPEND
I'm a paranoiac.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-11 17:39:02 +04:00
Cyrill Gorcunov
112b2fe524 zdtm: Extend eventfs00 for deferred eventpoll test
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-04 16:47:59 +04:00
Andrey Vagin
fc7bedc50a crtools: make to be able to split messages by pid
If the option --log-pid is set, each process will have an own log file.
Otherwise PID is added to each log message.

A message can't be bigger than one page minus some bytes for pid.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-04 16:22:04 +04:00
Cyrill Gorcunov
6cebc48420 zdtm: Add inotify00 test case
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-04 14:01:05 +04:00
Cyrill Gorcunov
5028f71c66 zdtm: Extend eventfs test for epolls
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-04 14:00:13 +04:00
Cyrill Gorcunov
580d3b0261 zdtm: Add eventfs00 test-case
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-04 13:59:58 +04:00
Cyrill Gorcunov
4f31e13c92 test, app-emu: Add HelloWorld java test
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-05-03 13:06:56 +04:00
Pavel Emelyanov
4debf589f6 tcp: Automate TCP stream c/r
This test is very basic :( Need more work on it.
One note about --close arg to crtools -- bash leaves all
fds open when laucnhing progams, and for restore this is
critical, as one of them can be busy. Iterating over all
the possibel fds and closing them is "do not want" thing.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-28 20:37:54 +04:00
Pavel Emelyanov
b2fced0601 tcp: Basic test of tcp conn
Only manual mode at the moment. Need to automate it later.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-28 17:59:21 +04:00
Pavel Emelyanov
32dc4c5702 zdtm: Fix xids00 test compilation on older distrol
The getsid/getpig require _GNU_SOURCE on some libc-s.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-25 21:35:37 +04:00
Cyrill Gorcunov
4c4a47a1a9 zdtm: Add socket6_udp test
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-23 14:11:31 +04:00
Konstantin Khlebnikov
0ff0943eb4 Drop <sys/user.h> to fix PAGE_SIZE declaration
On some systems PAGE_SIZE is declared as sysconf(_SC_PAGESIZE) in <sys/user.h>
this is non-constant expression, so it cannot be used in type declarations.

This breaks compilation with a very non-obvious error message:

  CC       parasite-syscall.o
In file included from parasite-syscall.c:30:0:
./include/parasite.h:90:8: error: variably modified ‘fds’ at file scope

crtools doesn't uses anything from <sys/user.h>, so we can drop its usage.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-16 14:38:49 +04:00
Pavel Emelyanov
fb27ed4e68 zdtm: Tests for testing completely unlinked files
This includes existing test and a new one, checking that
unlinked hardlinks are handled properly.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-13 17:57:35 +04:00
Pavel Emelyanov
09d9598074 sock: Add udp-lite sockets support
This is trivial. Just copy-n-paste pieces from the udp dumping
and restoring code. The zdtm test is also a compy of the _udp
test with respecitve changes.

Reuired for httpd, this one uses udplite sockets.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-13 10:42:30 +04:00
Pavel Emelyanov
f379e2ccf5 test: Add tar + bzip2 testsuite
Generate a pseudorandom tree of files, run tar cjf on it
to create referenced tarball, then run the same again on
the background, wait for a while, then checkpoint and restore
it and compare that two tarballs do not differ.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-12 15:20:15 +04:00
Cyrill Gorcunov
794d3fba40 zdtm: Extend file_own test for both pipe ends
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-12 14:32:02 +04:00
Pavel Emelyanov
1a1a1861dd tests: Add new "real-life" test suit
The intention is to put here tests, that check how real apps
work. Initially I test that make -j4 works. This test is very
basic (uses sleep to wait for make to fork everybody) and a
syntetic .c file (quite big though).

Extend and use.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-12 13:33:24 +04:00
Cyrill Gorcunov
956d28bb65 zdtm: Extend file_own test for sockets
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-12 12:31:58 +04:00
Cyrill Gorcunov
df6d5cfb23 zdtm: Add file_own test case
Tests for pipes fowners checkpoint/restore.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-12 12:29:25 +04:00
Pavel Emelyanov
b53c42a50b zdtm: Test for pgids and sids
If I'm not mistaken this covers all the if-s in the
restore_pgid and restore_sid code.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-11 22:13:43 +04:00
Pavel Emelyanov
b0aa868d47 zdtm: Add test for close-on-exec bits
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-10 18:38:03 +04:00
Andrey Vagin
a22ecfddf3 zdtm: add a new test case to check that all data can be restored
* create pipe
* write a maximum amount of data
* suspend/resume
* check that all data have been restored

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-05 20:53:27 +04:00
Andrey Vagin
2fef5cacb5 zdtm: write some data in pipe and read it after suspend/resume
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-05 20:53:12 +04:00
Pavel Emelyanov
8717463a15 zdtm: Add unix connected streams test
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-04-05 17:18:11 +04:00
Pavel Emelyanov
9e47a06cef zdtm: Extend file_shared test
Check for files with equal paths are handled"

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-03-24 16:05:13 +04:00
Pavel Emelyanov
e8bc5ebbbf zdtm: Added maps01 to zdtm script
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-03-21 11:33:58 +04:00
Andrey Vagin
7d10875076 zdtm: add new test case for testing shared memory
* map a big memory region
* fork
* unmap the first and tenth pages
* remap one page in another place
* touch a few pages
* check content of touched pages

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-03-21 10:55:46 +04:00
Pavel Emelyanov
b107d838cf zdtm: Remove socket_loop00 test
It's broken. Stas will fix it soon.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-03-02 15:54:43 +04:00