Otherwise test with -d option get fail (this is because
SIGTRAP get cleared by our parasizte engine).
The proper fix most likely will require kernel patching
or redesign of parasite code. Meanwhile to make test
working we switch to the signal which just known to work.
Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It has escaped me on previous pass.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The tls_data is used for read-cycles only thus
there is no need for mutex since this area get
filled earlier than fork() issued.
Same time on restore the tls filled before the
program restarts.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
P_ALL is an argument for waitid, not waitpid.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
No need for error code here, we test results
by special bitmap.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
* Execute VNC server and glxgears
* Dump/restore
* Check, that VNC server accepts connections
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This test tests the following combinations:
1. parent and child have a cow-ed mapping
2. parent and child have just coinciding mappings
the pages state in both should be in all possible combinations of
a. write mapped
b. read mapped
c. not touched
d. before fork
e. after fork
v2: * wait until a child are not prepared
* check a FILE | PRIVATE mappings
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
- use pthread_sigmask instead of sigprocmask
- show_sigset should take the size of dereferenced variable
- zeroify sigsets before use, since libc has own definition
for sigset which doesn't match one the kernel uses
http://bugzilla.openvz.org/show_bug.cgi?id=2437
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
During live migration timer overrun can jump forward too.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Stanislav Kinsbursky <skinsbursky@openvz.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Print PASS only once.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This test makes sure, that processes tree is restored before opened files.
This is guaranteed by holding child's "/proc/<pid>/stat" file opened by parent.
It was inspired by OpenVZ bug:
#2404
IOW, OpenVZ can't restore container with such test inside.
v2:
1) Test renamed + carefull cleanup + minor updates.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It seems I've screwed the setup and mount points on
my testing machine thus mountpoint test become failing.
Nevertheless, better to report where exactly we've failed
for easier investigation.
With this patch I get
| ./mountpoints --pidfile=mountpoints.pid --outfile=mountpoints.out
| 20:26:07.398: 1745: umount(`/dev') failed: Device or resource busy
| 20:26:07.398: 1745: umount(`/vz') failed: Device or resource busy
| 20:26:07.399: 1745: umount(`/vz') failed: Device or resource busy
| 20:26:07.399: 1745: umount(`/vz') failed: Device or resource busy
| 20:26:07.399: 1745: umount(`/vz') failed: Device or resource busy
| 20:26:07.399: 1745: FAIL: mountpoints.c:60: Can't umount all the filesystems (errno = 16)
| 20:26:07.404: 1744: ERR: test.c:298: Test exited with unexpectedly with code 1
| (errno = 4)
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
* Increase sizes of tcp rcv and snd bufffers
* Fill buffers
* Dump/Restore
* Check, that all data were restored
This test reproduces a problem from buf #2411
v2: don't use test_waitsig() in external processes, because they
can be out of this pid name-space.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Here are two things:
* A test process is a session leader
* It has a terminal, which are not conrolling for anyone.
For bug #2409
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Since we support tty migration, use it here,
otherwise it'll fail.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
For vz containers, monotonic time freezes when a container is
checkpointed. This makes the zdtm posix timer test fail.
To fix this, obtain time passed, which is used to check timer results,
using the clock used by the timer.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
To test new bits we fetch from VmFlags smaps interface.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Kinsbursky Stas added a comment - 24/Oct/12 4:24 PM
st_dev won't be the same. It's generated on each NFS superblock creation.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
sched_prio00 tests only priorities and sched_policy00
tests scheduling policy.
scheduling policy can not be changed in OpenVZ containers.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
getsid is required _XOPEN_SOURCE_EXTENDED,
it's enabled if __GNU_SOURCE is defined.
session00.c:92: error: implicit declaration of function 'getsid'
Signed-off-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It's a rudiment which not parsed well by all
gcc versions.
Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
No magic here, just fetch info using getpriority and sched_getxxx calls.
Good news is that the mentioned syscalls take pid as argument and do work
with it, i.e. -- no need in parasite help here.
Restore is splitted into prep -- copy sched bits from image on restorer
args -- and the restore itself. It's done to avoid restoring tasks info
with IDLE priority ;) To make restorer not-fail sched bits are validated
for sanity on prep stage.
Minimal sanity test is also there.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>