Skip to content

fix spurious test failure in metadata_access_times#153871

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
mattiapitossi:issue-148408
Apr 12, 2026
Merged

fix spurious test failure in metadata_access_times#153871
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
mattiapitossi:issue-148408

Conversation

@mattiapitossi
Copy link
Copy Markdown
Contributor

@mattiapitossi mattiapitossi commented Mar 14, 2026

Fixes #148408

The metadata_access_times test checks if the creation of a file occurs before another file, this check happens only on Linux. While on Win and Macos we check only that the created metadata is available. Given that the SystemTime is non monotonic as Instant this test could result in failures when the system clock changes.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 14, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 14, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, joboet

Comment thread library/std/src/fs/tests.rs Outdated
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 23, 2026
@mattiapitossi
Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 10, 2026
@Mark-Simulacrum
Copy link
Copy Markdown
Member

@bors squash

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 11, 2026

🚧 Squashing... this can take a few minutes.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 11, 2026

❗ Failed to push the squashed commit to mattiapitossi/rust:issue-148408: Push timeouted

@Mark-Simulacrum
Copy link
Copy Markdown
Member

@bors squash

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 11, 2026

🚧 Squashing... this can take a few minutes.

* remove time assertion on SystemTime
* skip test only if when a time change occurs
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 11, 2026

❗ Failed to push the squashed commit to mattiapitossi/rust:issue-148408: Push timeouted

@Mark-Simulacrum
Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 11, 2026

📌 Commit 9371fea has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 11, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 11, 2026
…-Simulacrum

fix spurious test failure in `metadata_access_times`

Fixes rust-lang#148408

The metadata_access_times test checks if the creation of a file occurs before another file, this check happens only on Linux. While on Win and Macos we check only that the created metadata is available. Given that the SystemTime is non monotonic as Instant this test could result in failures when the system clock changes.
rust-bors Bot pushed a commit that referenced this pull request Apr 11, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #154491 (Extend `core::char`'s documentation of casing issues)
 - #155126 (add `cfg(target_object_format = "...")`)
 - #153871 (fix spurious test failure in `metadata_access_times`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 11, 2026
…-Simulacrum

fix spurious test failure in `metadata_access_times`

Fixes rust-lang#148408

The metadata_access_times test checks if the creation of a file occurs before another file, this check happens only on Linux. While on Win and Macos we check only that the created metadata is available. Given that the SystemTime is non monotonic as Instant this test could result in failures when the system clock changes.
rust-bors Bot pushed a commit that referenced this pull request Apr 12, 2026
Rollup of 7 pull requests

Successful merges:

 - #155084 (Initial functions to start on transmute v2)
 - #155126 (add `cfg(target_object_format = "...")`)
 - #155165 (Portable SIMD subtree update)
 - #153871 (fix spurious test failure in `metadata_access_times`)
 - #155150 (replace <name> @ ty::AliasTy matches with just using args: <name>_args)
 - #155159 (Fix min-specialization ICE from ignored region resolution failure)
 - #155167 (Reduce size of `ImportData`)
@rust-bors rust-bors Bot merged commit af4f14b into rust-lang:main Apr 12, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 12, 2026
rust-timer added a commit that referenced this pull request Apr 12, 2026
Rollup merge of #153871 - mattiapitossi:issue-148408, r=Mark-Simulacrum

fix spurious test failure in `metadata_access_times`

Fixes #148408

The metadata_access_times test checks if the creation of a file occurs before another file, this check happens only on Linux. While on Win and Macos we check only that the created metadata is available. Given that the SystemTime is non monotonic as Instant this test could result in failures when the system clock changes.
@mattiapitossi mattiapitossi deleted the issue-148408 branch April 12, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spurious test failure in metadata_access_times

3 participants