Repository navigation
Some tests fail on windows in AzureCI #110644
Copy link
Copy link
Closed
Labels
OS-windowspendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
0:00:16 load avg: 15.12 [ 24/469/1] test_re failed (env changed)
D:\a\1\s\Lib\test\support\os_helper.py:531: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\a\\1\\s\\build\\test_python_464�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_464�'
with temp_dir(path=name, quiet=quiet) as temp_path:
D:\a\1\s\Lib\test\support\os_helper.py:532: RuntimeWarning: tests may fail, unable to change the current working directory to 'D:\\a\\1\\s\\build\\test_python_464�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_464�'
with change_cwd(temp_path, quiet=quiet) as cwd_dir:
0:00:17 load avg: 15.15 [ 27/469/2] test_scope failed (env changed)
D:\a\1\s\Lib\test\support\os_helper.py:531: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\a\\1\\s\\build\\test_python_2168�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_2168�'
with temp_dir(path=name, quiet=quiet) as temp_path:
D:\a\1\s\Lib\test\support\os_helper.py:532: RuntimeWarning: tests may fail, unable to change the current working directory to 'D:\\a\\1\\s\\build\\test_python_2168�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_2168�'
with change_cwd(temp_path, quiet=quiet) as cwd_dir:
0:00:19 load avg: 15.19 [ 29/469/3] test_wmi failed (env changed)
D:\a\1\s\Lib\test\support\os_helper.py:531: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\a\\1\\s\\build\\test_python_7112�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_7112�'
with temp_dir(path=name, quiet=quiet) as temp_path:
D:\a\1\s\Lib\test\support\os_helper.py:532: RuntimeWarning: tests may fail, unable to change the current working directory to 'D:\\a\\1\\s\\build\\test_python_7112�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_7112�'
with change_cwd(temp_path, quiet=quiet) as cwd_dir:
0:00:37 load avg: 13.90 [ 46/469/5] test_zipfile failed (env changed) -- running (1): test_logging (35.1 sec)
D:\a\1\s\Lib\test\support\os_helper.py:531: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\a\\1\\s\\build\\test_python_5692�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_5692�'
with temp_dir(path=name, quiet=quiet) as temp_path:
D:\a\1\s\Lib\test\support\os_helper.py:532: RuntimeWarning: tests may fail, unable to change the current working directory to 'D:\\a\\1\\s\\build\\test_python_5692�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_5692�'
with change_cwd(temp_path, quiet=quiet) as cwd_dir:
and maybe others.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
OS-windowspendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
zooba commentedon Oct 16, 2023
Wild guess without looking any closer: maybe a previous test has created a file with
TESTFN, which then prevents the OS from creating a directory with the same name. I don't remember exactly what the error code is for that situation, but I'm pretty sure it's a not very obvious one.zooba commentedon Oct 16, 2023
Or possibly (and maybe more likely), nobody is creating the
builddirectoryD:\a\1\s\build\.If it can be easily overridden, I'd set the test working directory to
$(Build.BinariesDirectory)anyway (or maybe a subdirectory), but that's a minor aside. If not every test is creating the directory, then you'll get failures like this that vary based on the order they run in.StanFromIreland commentedon Oct 5, 2025
Triage: I don't see such fails any more,
test_profilingis flaky but otherwise green, e.g. this run. Can this be closed?