This fixes the following test error:
FAIL: binfmt_misc.c:111: mount failed (errno = 1 (Operation not permitted))
CRIU tests (./test/zdtm.py run -a) passed.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Generate random binfmt_misc entries of different types
and check that they remain registered after the signal.
v2: pr_perror() in cleanup, .desc file and TST_DIR in Makefile
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This test calls iptables to set a new packet filter using a shared
library libxt_standard.so. Unfortunately, depending on the
distribution we are running on, this shared library may be stored on a
different place.
This patch allows this test to be run on Debian like systems.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Depending on the distribution, binaries or shared libraries a test is
dependent of may not be stored at the same place.
This patch introduces the ability to define option in the dependency
list, by separating the optional target names by a '|' character.
For instance the dependency of test may be described this way:
{'flavor': 'ns', 'deps': [ '/bin/foo|/usr/bin/foo' ], 'flags': 'suid'}
Note, there shouldn't be any spaces around the '|'.
If none of the optional dependency is satisfied, an error is raised.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
The descriptor for test netns-nf and netns are referencing /bin/diff.
On Fedora this is a hard link to /usr/bin/diff created during the
install of the package diffutils. However this hard link doesn't exist
on Debian like systems.
Referencing /usr/bin/diff works in both cases.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
It turns out we can't just test for /proc/<pid>, because the kernel appends
(deleted), since the directory is actually deleted (vs. something like
/proc/1/mountinfo, where the file still exists in the unlinked directory,
so there is no (deleted)). See comment for details.
v2: s/ret/is_dead in /proc/<pid>/xxx test, split tests to correctly test
both cases
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
A static test should not change its state during C/R.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
A static test should not change its state during C/R
===================== Run zdtm/live/static/session00 in ns =====================
Start test
./session00 --pidfile=session00.pid --outfile=session00.out
Run criu dump
Run criu restore
7: Old files lost: set(['4'])
7: New files appeared: set([])
############# Test zdtm/live/static/session00 FAIL at fds compare ##############
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Define correct syscall numbers for fanotify_init
and fanotify_mark for arm64.
Signed-off-by: Vijaya Kumar K <vijayak@caviumnetworks.com>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Replace stack alignment magic constant with
__stack_aligned__ macro.
Also align stack for sigaltstack test case.
Signed-off-by: Vijaya Kumar K <vijayak@caviumnetworks.com>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
arm64 requires stack pointer to be aligned to 16 bytes.
Update all test cases that are using clone system call
to have 16 byte aligned stack pointer.
Signed-off-by: Vijaya Kumar K <vijayak@caviumnetworks.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Loginuid tests should run only when kdat.has_loginuid set.
This is for > 3.13 kernels with CONFIG_AUDITSYSCALL enabled.
Signed-off-by: Dmitry Safonov <dsafonov@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Some tests require criu to be root, e.g. tcp tests of unlink-mmaps ones,
so mark those in desc files as such.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Looks-good-to-me: Andrew Vagin <avagin@virtuozzo.com>
There are several restrictions:
1. Onlu dump is checked (--norst) for now
2. Only host flavor as tests has to start themselves in non-root mode
3. Only non-suid tests
4. TCP doesn't work too, should be manually excluded :\
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Looks-good-to-me: Andrew Vagin <avagin@virtuozzo.com>
To test c/r of creds we need more precise way,
so lets add a few additional creds to test.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Otherwise we will not able to access /proc/pid/* for the process.
v2: s/__NR_WAIT4/__NR_setresuid
Cc: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Modification time changes after cpt/rst file_attr test in VZ7CT:
CT-102 criu# cat test/zdtm/live/static/file_attr.out
15:05:05.315: 146: FAIL: file_attr.c:101: modification time has
changed (errno = 11 (Resource temporarily unavailable))
https://jira.sw.ru/browse/PSBM-41401
v2: add timeval message, test seem to pass now - remove noauto
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The mountpoints.c test creates such mount and criu will try to
kerndat-check one, so this fs should be on "host".
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The mountpoints.c test creates such mount and criu will try to
kerndat-check one, so this fs should be on "host".
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
A static test should not change its state during C/R
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
A static test should not change its state during C/R.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Otherwise we can see this error:
5: Old files lost: set([])
5: New files appeared: set(['5', '6'])
Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>