It seems with the new zdtm.py that pids collide a lot more (perhaps because
everything is in its own pid namespace? not sure). In any case, this is
annoying as it prevents a second run of the tests from actually getting to
the test part.
So, let's try to move the old directory out of the way.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Most python uses spaces, so that's probably what people have their editors
configured to do. Since this file uses tabs, let's be explicit about it.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This avoids problems like:
$ sudo ./zdtm.py run -a
Skipping test zdtm/live/static/mem-touch (manual run only)
./sock_opts00 --pidfile=sock_opts00.pid --outfile=sock_opts00.out
./sock_opts00 --pidfile=sock_opts00.pid --outfile=sock_opts00.out
==================== Run zdtm/live/static/sock_opts00 in h =====================
Start test
Test is SUID
Run CRIU: [dump -o dump.log -D dump/zdtm/live/static/sock_opts00/74/1 -v4 -t 74 --pidfile /home/ubuntu/criu/test/zdtm/live/static/sock_opts00.pid]
Run CRIU: [restore -o restore.log -D dump/zdtm/live/static/sock_opts00/74/1 -v4 --pidfile /home/ubuntu/criu/test/zdtm/live/static/sock_opts00.pid --restore-detached]
Wait for zdtm/live/static/sock_opts00 to die for 0.100000
Remvoing dump/zdtm/live/static/sock_opts00/74
==================== Test zdtm/live/static/sock_opts00 PASS ====================
==================== Run zdtm/live/static/sock_opts00 in ns ====================
Construct root for zdtm/live/static/sock_opts00
Start test
Test is SUID
Traceback (most recent call last):
File "zdtm.py", line 850, in <module>
do_run_test(tinfo[0], tinfo[1], tinfo[2], tinfo[3])
File "zdtm.py", line 641, in do_run_test
cr(cr_api, t, opts)
File "zdtm.py", line 562, in cr
cr_api.set_test(test)
File "zdtm.py", line 469, in set_test
os.makedirs(self.__dump_path)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: 'dump/zdtm/live/static/sock_opts00/153'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "zdtm.py", line 46, in clean_tests_root
os.rmdir(tests_root)
OSError: [Errno 16] Device or resource busy: '/tmp/criu-root-MmGEQD'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "zdtm.py", line 46, in clean_tests_root
os.rmdir(tests_root)
OSError: [Errno 16] Device or resource busy: '/tmp/criu-root-MmGEQD'
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
On debian/ubuntu systems, we don't have a /bin/env by default; on rhel
systems (my limited testing seems to indcate that) /usr/bin/env is a
symlink to /bin/env, so let's just use that so it works everywhere.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It's very inconvenient to read the zdtm.py output with long
lines of options.
Reported-by: Andrey Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Otherwise make's output appears in logs before zdtm.py's one
Reported-by: Andrey Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
First -- set cannot be made out of lists (and maps lists contain lists of pairs)
Second -- it is much better to read map diffs in hex, rather than ints (as they
would be if repr-ed by default)
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It allows to execute zdtm.py not only from the test directory.
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This script prepares the cgroups hierarchies that are used by
tests to avoid creation of those in parallel with tests, that
do not expect them to appear.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Includes C/R images dir and the zdtm.py logs for one test only.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@odin.com>
Things added are:
1. /usr directories (links to respective / ones)
2. /sbin dir
3. per-test dependencies that are listed in .desc file as 'deps': [<list>]
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Current implementation of print_sep has off-by-one-like issue -- it
can print one character more :) Fix this and make the code shorter.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This option cannot be tested using classic zdtm tests as it implies
some data created before restore and passed through criu restore down
to the restored process (descriptor in our case).
So add inhfd_test class that creates such.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Tree ways are possible -- always, never and only for tests that failed. The
latter one is the default.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This flag means that there's lib/ directory where a plugin is.
Currently rtc test is such. The wait_pid_die timeout is risen
since this test dies for more than 6 seconds :)
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Hand-made list of tests is not great. As Christopher suggested we can find
all executables in a directory and treat them as tests. This idea is good,
but requires a little bit more trickery.
First, some executables in directory are not tests, e.g. these are per-test
scripts, which should be skipped. Next, not all tests in zdtm can be right
now run in continuous manner (they fail), but we want to run them manually.
To fix that such tests are marked with 'noauto' flag in the description.
So we have the test test descriptor file, which states in which file to
look for tests (executable) and which of them to exclude. Maybe more, can
be added on demand.
And, finally, the per-test description goes in a ${test}.desc file in native
python eval/repr-able format. If the file is absent a default description
is used.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The main difficulty here is that restored test becomes zdtm.py's kid
and after killing one we should wait() the test's zombie. W/o the
--restore-sibling test gets restored under existing init and gets
wait()-ed automagically.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>