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>
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>
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>
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>
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>
* 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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
* 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>