mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
zdtm.py: unmount tests_root before rm-ing it
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>
This commit is contained in:
committed by
Pavel Emelyanov
parent
225273c4d6
commit
615e79952d
@@ -42,6 +42,7 @@ tests_root = None
|
||||
|
||||
def clean_tests_root():
|
||||
global tests_root
|
||||
subprocess.call(["umount", tests_root])
|
||||
if tests_root:
|
||||
os.rmdir(tests_root)
|
||||
|
||||
|
Reference in New Issue
Block a user