Skip to content

Conversation

@Zalathar
Copy link
Member

These tests take hours to run in Miri, which greatly increases the duration of the x86_64-gnu-aux job, as observed in #150900 (comment).

@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 Jan 11, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 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

@Zalathar
Copy link
Member Author

@bors try jobs=x86_64-gnu-aux

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 11, 2026
alloctests: Don't run the longer partial-sort tests under Miri

try-job: x86_64-gnu-aux
@Zalathar
Copy link
Member Author

r? tgross35

@rustbot rustbot assigned tgross35 and unassigned Mark-Simulacrum Jan 11, 2026
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming this does enough to get the time back

View changes since this review

Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I'm unfamiliar with miri how it can take hours to finish. Locally, it takes a few seconds to finish.

View changes since this review

@tgross35
Copy link
Contributor

I'm unfamiliar with miri how it can take hours to finish. Locally, it takes a few seconds to finish.

Do you mean running the tests in miri locally takes a few seconds? Or running them natively?

@tisonkun
Copy link
Contributor

I'm unfamiliar with miri how it can take hours to finish. Locally, it takes a few seconds to finish.

Do you mean running the tests in miri locally takes a few seconds? Or running them natively?

Nope. Natively.

How can I run tests in miri locally?

@Zalathar
Copy link
Member Author

How can I run tests in miri locally?

You should be able to do ./x miri library/alloc to run the tests in Miri locally.

@tgross35
Copy link
Contributor

For context, Miri tends to be kind of slow for any sort of high iteration or high allocation testing; it doesn't benefit from optimizations (except maybe MIR opts? I'm not sure). Since the sorting algorithm can be up to $O(n^2)$, that adds up quick.

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 11, 2026

☀️ Try build successful (CI)
Build commit: 5972e98 (5972e9802f9f1a662806499dbdfec420497a1eac, parent: f57eac1bf98cb5d578e3364b64365ec398c137df)

@Zalathar
Copy link
Member Author

@bors r=tgross35 rollup p=1

This should reduce CI times by about ~1 hour.

@rust-bors rust-bors bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 11, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 11, 2026

📌 Commit 5081393 has been approved by tgross35

It is now in the queue for this repository.

@rust-bors rust-bors bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 11, 2026
rust-bors bot added a commit that referenced this pull request Jan 11, 2026
Rollup of 12 pull requests

Successful merges:

 - #150947 (alloctests: Don't run the longer partial-sort tests under Miri)
 - #148196 (Implement create_dir_all() to operate iteratively instead of recursively)
 - #150494 ( Fix dso_local for external statics with linkage)
 - #150788 (THIR patterns: Replace `AscribeUserType` and `ExpandedConstant` wrappers with per-node data)
 - #150799 (Fix ICE: can't type-check body of DefId  for issue #148729)
 - #150804 (Remove std_detect_file_io and std_detect_dlsym_getauxval features)
 - #150852 (std: sys: fs: uefi: Implement File::write)
 - #150871 (Use f64 NaN in documentation instead of sqrt(-1.0))
 - #150878 (Emit an error for linking staticlibs on BPF)
 - #150911 (Add missing documentation for globs feature)
 - #150913 (compiler: Forward attributes to eii-expanded macros)
 - #150916 (Once again, reorganize the EII tests a bit)

r? @ghost
@Zalathar
Copy link
Member Author

With these changes, the offending test should now take 20 seconds instead of 1.5 hours:

2026-01-11T02:25:07.4764420Z test sort::partial::basic_impl ... ok
2026-01-11T02:25:27.5141644Z test sort::partial::random_patterns ... ok

@rust-bors rust-bors bot merged commit c680b74 into rust-lang:main Jan 11, 2026
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 11, 2026
@Zalathar Zalathar deleted the partial-sort-miri branch January 11, 2026 06:48
rust-timer added a commit that referenced this pull request Jan 11, 2026
Rollup merge of #150947 - partial-sort-miri, r=tgross35

alloctests: Don't run the longer partial-sort tests under Miri

These tests take hours to run in Miri, which greatly increases the duration of the `x86_64-gnu-aux` job, as observed in #150900 (comment).

- [Zulip thread in #t-infra](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/x86_64-gnu-aux.20job.20went.20from.20~2.20to.20~3.2E5.20hours/near/567354541)
@RalfJung
Copy link
Member

With miri being 4-5 orders of magnitude slower than native execution, "a few seconds native" and "a few hours in Miri" is exactly what I would expect.

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.

6 participants