The ns and uns flavors are MUCH better ways of launching tests in namespaces.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Instead of doing some dirs/files/links in launcher and some in
libzdtm, make everything in the launcher. The library is then
just to set up the namespaces.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
If we get EBUSY here, it means that we didn't umount in the test (i.e. we
didn't call fini() on some path). We should just do that instead.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This change does two things to be more defensive: 1. add a checkskip script
which fails if __NR_seccomp isn't defined, and 2. allows
seccomp_filter_tsync to compile even if it isn't defined (and then fails
"gracefully" with a skip message if it does).
The checkskip bits are necessary because zdtm.sh gets confused if the test
exits 0 without actually invoking criu.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This tests c/r of the link-local scope-id argument to bind().
v2: sort the interfaces so diff works
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This header is unused, and not present on kernels w/o CONFIG_BPF_SYSCALL,
so let's not require it.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We get the stack trace if a test failed:
Test output: ================================
09:11:34.584: 4: PASS
<<< ================================
Traceback (most recent call last):
File "zdtm.py", line 922, in <module>
do_run_test(tinfo[0], tinfo[1], tinfo[2], tinfo[3])
File "zdtm.py", line 696, in do_run_test
t.kill()
File "zdtm.py", line 302, in kill
self.__flavor.fini()
File "zdtm.py", line 168, in fini
subprocess.check_call(["mount", "--make-private", self.root])
File "/usr/lib64/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['mount', '--make-private', '/tmp/criu-root-YN1t3X']' returned non-zero exit status 32
umount: /tmp/criu-root-YN1t3X: not mounted
Cc: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
In current implementation of thread bomb effectively only one
thread runs, the rest sit in the read from pipe.
Fix this by making threads constantly creating new ones and
just exiting.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
There's a sat.py script in criu-scripts repo that analyzes the strace
outputs. It's useful to check the amount of system calls criu takes to
do dump or restore of certain apps.
So add the --sat key to zdtm.py that would generate sat-able logs for
individual tests.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
v2:
* add another filter to the chain to test the inheritance chaining check
* include zdtm.py desc file
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
If two ns_flavor.init() are called in parallel then all the os.mkdir()
calls would end up with EEXISTS exception.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
There are tests (e.g. on locks) that can conflict with each other, so
wait for all the other jobs to finish before running such.
v2:
Wait for the excl test to finish before launching more of them.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm.sh doesn't suppport dependencies. This test uses the ip tool.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
I'm too lazy to install new tools on all test hosts.
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Some test binaries weren't ignored, and some of the new zdtm.py files.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>