Skip to content

gh-161262: Fix test_touch_common flake on Emscripten - #161464

Merged
cmaloney merged 1 commit into
python:mainfrom
cmaloney:gh-161262-touch-mtime
Nov 14, 2026
Merged

cmaloney merged 1 commit into
python:mainfrom
cmaloney:gh-161262-touch-mtime

Conversation

@cmaloney

@cmaloney cmaloney commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Under Node, NODEFS takes a new file's mtime from the host kernel but utime(path, None) uses Date.now() written back via fs.utimesSync, which can land a millisecond before the creation time. Take the baseline from utime(path, None) too, so both timestamps come from the same source.

Under Node, NODEFS takes a new file's mtime from the host kernel but
utime(path, None) uses Date.now() written back via fs.utimesSync, which
can land a millisecond before the creation time.  Take the baseline from
utime(path, None) too, so both timestamps come from the same source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cmaloney
cmaloney requested a review from barneygale as a code owner November 6, 2026 07:17
@bedevere-app bedevere-app Bot added awaiting core review tests Tests in the Lib/test dir labels Nov 6, 2026
@cmaloney cmaloney added 3.14 bugs and security fixes 3.15 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes and removed 3.14 bugs and security fixes 3.15 bugs and security fixes labels Nov 14, 2026
@cmaloney
cmaloney merged commit cc98745 into python:main Nov 14, 2026
109 of 111 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @cmaloney for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@cmaloney
cmaloney deleted the gh-161262-touch-mtime branch November 14, 2026 22:14
@bedevere-app

bedevere-app Bot commented Nov 14, 2026

Copy link
Copy Markdown

GH-162025 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 14, 2026
@bedevere-app

bedevere-app Bot commented Nov 14, 2026

Copy link
Copy Markdown

GH-162026 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Nov 14, 2026
cmaloney added a commit that referenced this pull request Nov 14, 2026
… (#162026)

gh-161262: Fix test_touch_common flake on Emscripten (GH-161464)

Under Node, NODEFS takes a new file's mtime from the host kernel but
utime(path, None) uses Date.now() written back via fs.utimesSync, which
can land a millisecond before the creation time.  Take the baseline from
utime(path, None) too, so both timestamps come from the same source.
(cherry picked from commit cc98745)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
cmaloney added a commit that referenced this pull request Nov 14, 2026
… (#162025)

gh-161262: Fix test_touch_common flake on Emscripten (GH-161464)

Under Node, NODEFS takes a new file's mtime from the host kernel but
utime(path, None) uses Date.now() written back via fs.utimesSync, which
can land a millisecond before the creation time.  Take the baseline from
utime(path, None) too, so both timestamps come from the same source.
(cherry picked from commit cc98745)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant