Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests faster in Miri #74974

Merged
merged 4 commits into from
Aug 2, 2020
Merged

Make tests faster in Miri #74974

merged 4 commits into from
Aug 2, 2020

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jul 31, 2020

Reduce some test iteration counts in Miri.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2020
@Mark-Simulacrum
Copy link
Member

r=me, unless you want to wait for the investigation to conclude

@@ -1722,7 +1722,7 @@ fn panic_safe() {
let mut rng = thread_rng();

// Miri is too slow
let lens = if cfg!(miri) { (1..10).chain(20..21) } else { (1..20).chain(70..MAX_LEN) };
let lens = if cfg!(miri) { (1..10).chain(0..0) } else { (1..20).chain(70..MAX_LEN) };
Copy link
Member Author

Choose a reason for hiding this comment

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

I added the "20" case without measuring, which clearly was a mistake. So let's remove it again.

(We have to chain to make this type-check.)

Copy link
Contributor

Choose a reason for hiding this comment

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

(We have to chain to make this type-check.)

Perhaps this rationale is best left in a comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, done.

@RalfJung
Copy link
Member Author

Investigation concluded, but it made me realize I should also check the libcore test suite for overlong tests, so I am doing that now.

@RalfJung
Copy link
Member Author

@Mark-Simulacrum I also adjusted some libcore tests.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 2, 2020

📌 Commit ff0c3a9 has been approved by Mark-Simulacrum

@bors bors 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 Aug 2, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#74686 (BTreeMap: remove into_slices and its unsafe block)
 - rust-lang#74762 (BTreeMap::drain_filter should not touch the root during iteration)
 - rust-lang#74781 (Clean up E0733 explanation)
 - rust-lang#74874 (BTreeMap: define forget_type only when relevant)
 - rust-lang#74974 (Make tests faster in Miri)
 - rust-lang#75010 (Update elasticlunr-rs and ammonia transitive deps)
 - rust-lang#75041 (Replaced log with tracing crate)
 - rust-lang#75044 (Clean up E0744 explanation)
 - rust-lang#75054 (Rename rustc_middle::cstore::DepKind to CrateDepKind)
 - rust-lang#75057 (Avoid dumping rustc invocations to stdout)

Failed merges:

 - rust-lang#74827 (Move bulk of BTreeMap::insert method down to new method on handle)

r? @ghost
@bors bors merged commit 7d18040 into rust-lang:master Aug 2, 2020
@RalfJung RalfJung deleted the miri-tests branch August 7, 2020 08:59
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants