[New-bugs-announce] [issue30170] "tests may fail, unable to create temporary directory" warning on buildbot: add a cleanup step to buildbots

STINNER Victor report at bugs.python.org
Wed Apr 26 09:17:22 EDT 2017


New submission from STINNER Victor:

On buildbots, it's common to see such warning:


0:32:04 [269/404] test_property passed -- running: test_multiprocessing_spawn (74 sec)
D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py:1012: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\buildarea\\3.x.bolen-windows10\\build\\build\\test_python_1048': [WinError 183] Cannot create a file when that file already exists: 'D:\\buildarea\\3.x.bolen-windows10\\build\\build\\test_python_1048'
  with temp_dir(path=name, quiet=quiet) as temp_path:
running: test_cmd_line_script (30 sec), test_multiprocessing_spawn (104 sec)

I also got it *sometimes*. It took me months to understand where it does come from.

It's quite stupid in fact: temporary directories are not removed if a test does crash (ex: segfault). Later, if a test process has the same PID than the crashed process, you get the warning.

I suggest to add a "clean" step on buildbots to first remove old "test_python_*" directories leaked by previous runs.

First, I wanted to add such cleanup in regrtest directly, but it's common that I run two main regrtest processes in parallel, and I would like to keep this feature. If regrtest starts by removing test_python_*: it will break currently running tests.

I'm not 100% confident that the warning is caused by previous runs, but I think that it's worth it to try to cleanup to check if it's case ;-)

----------
components: Tests
keywords: buildbot
messages: 292340
nosy: haypo, serhiy.storchaka, zach.ware
priority: normal
severity: normal
status: open
title: "tests may fail, unable to create temporary directory" warning on buildbot: add a cleanup step to buildbots
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30170>
_______________________________________


More information about the New-bugs-announce mailing list