Before we were unshare(CLONE_NEWCGROUP)ing in a child task, which meant
that we couldn't c/r this test once we forbid nested cgroup namespaces.
Instead, use a new strategy for testing cgroup namespaces: set up the
namespace before forking the test task so there is no nesting, and then do
a setns back to init's ns to check the cgroup namespace of the test. This
doesn't work in the 'ns' flavor because init in the test's pid ns is the
test itself. There is a bit of a chicken and egg problem here, though,
because if we set it up after test_init(), we can't unshare because that
would be a nested cgroup ns.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
We don't have a way to dump proccess blocked in vfork(), hence
mark this test as expected to fail.
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
execlp() fails when we run vfork00 test inside namespace because we don't have
'/bin/true' there. Instead of execlp() in vfork-child we can just _exit().
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
We better should switch to nmk usage.
But lets c/p for now.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
With GNU make, using .PHONY leads to the same result as using
the "FORCE" hack, but unlike FORCE is not a hack. Since we do not
plan to use any other make than GNU make, let's just mark phony
targets as such.
For more details about why PHONY is better than FORCE, see
http://www.gnu.org/software/make/manual/make.html#index-FORCE
[v2: rebased and splitted]
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
In Ubuntu flock opens a file with O_RDWR and then it can't be executed
flock: ./zdtm_mount_cgroups: Text file busy
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
The nmk framework now references PowerPC 64 bits architectures as
ppc64. This applies for both little endian, and the future supported
big endian one.
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
It was replaced by zdtm.py.
v2: remove zdtm.sh from other scripts
remove fault-injection, because nobody uses it
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Tests are often run in VMs and 5 seconds on loaded environments might
be not enough to catch transition zdtm tests.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Move static and transition into zdtm top. We can't move all the micro
tests themselves, as we need to distinguish static from non static (zdtm.py
makes additional checks on static ones).
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
These two sets are the same -- they test something and ask to be
C/R-ed at the time they do it. No other differences.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
If we forget to clean some of this stuff, we can get into strange states
where zdtm.py thinks it has constructed the root, but really hasn't, and
can't construct the root because it partially exists.
v2: kill all the extra debugging crap from v1
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
It's an extension of mntns_root_bind, which is differ by one more bind mount.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
We missed restore problems with multiple semaphores in one array
with vzt-cpt, enhance the test to catch it.
The problem was the change of 'struct sem' size which lead to wrong
memcpy of sem_array->sem_base in our kernel checkpointing.
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Because of the #undef (probably left over from some debugging I did that
accidentally got committed), this test never ran. Anyway, this is all
unnecessary because we can just use the seccomp_filter feature flag in the
tests.
Also reenable the seccomp_filter_tsync test.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This is superceded by criu check seccomp_filter and doesn't work on some
systems anyway.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
It always exits with "no support" message and checkskip works strangely. Need
to resolve those two first."
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Fix checkskip logic, also emit a clearer reason when checkskip fails as to
why the test was skipped.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This tests sets filters which drops all packets which don't
belongs to current tcp connections and creates one tcp connection.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
All processes should exit if an user presses ctrl-c.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Skip it till remap-links are supported.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Test checks that a deleted file content in a deleted parent directory
restores right. Initially directory is created in a separate mount,
to check the ghost file is created in right mount and link() in
rfi_remap() is working.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
The issue here is that ARCH is not overwritten if the caller Makefile
already define it, and the upper Makefile is not overwriting the ARCH
define to "arm", when it is "armv7l" for instance, so the SRCARCH is
set to "armv7l" which is wrong.
With this patch, SRCARCH is using the inherinted define if called from
the top level Makefile.
This is required to build test on armv7l architecture (qemu).
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Sometimes I get:
sudo ./zdtm.py run -t zdtm/live/static/cgroup03
umount: /home/tycho/packages/criu/test/zdtm.qPwsoO: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
Traceback (most recent call last):
File "./zdtm.py", line 1401, in <module>
tst.available()
File "./zdtm.py", line 435, in available
subprocess.check_call(["flock", "zdtm_mount_cgroups", "./zdtm_mount_cgroups"])
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['flock', 'zdtm_mount_cgroups', './zdtm_mount_cgroups']' returned non-zero exit status 1
let's use a lazy unmount so we avoid this.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>