Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-146202: Create tmp_dir in regrtest worker#146347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:regrtest_tmp_dir
Mar 23, 2026
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletionsLib/test/libregrtest/utils.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -452,12 +452,6 @@ def get_temp_dir(tmp_dir: StrPath | None = None) -> StrPath:
f"unexpectedly returned {tmp_dir!r} on WASI"
)
tmp_dir = os.path.join(tmp_dir, 'build')

# When get_temp_dir() is called in a worker process,
# get_temp_dir() path is different than in the parent process
# which is not a WASI process. So the parent does not create
# the same "tmp_dir" than the test worker process.
os.makedirs(tmp_dir, exist_ok=True)
else:
tmp_dir = tempfile.gettempdir()

Expand Down
3 changes: 3 additions & 0 deletionsLib/test/libregrtest/worker.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -127,6 +127,9 @@ def main() -> NoReturn:
worker_json=sys.argv[1]

tmp_dir=get_temp_dir()
# get_temp_dir() can be different in the worker and the parent process.
# For example, if --tempdir option is used.
os.makedirs(tmp_dir,exist_ok=True)
work_dir=get_work_dir(tmp_dir,worker=True)

withexit_timeout():
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
Fix a race condition in regrtest: make sure that the temporary directory is
created in the worker process. Previously, temp_cwd() could fail on Windows if
the "build" directory was not created. Patch by Victor Stinner.
Loading

[8]ページ先頭

©2009-2026 Movatter.jp