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

std float tests: special-case Miri in feature detection #128818

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Aug 8, 2024

Quick work-around to fix miri-test-libstd failures.

r? @tgross35

@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 Aug 8, 2024
@tgross35
Copy link
Contributor

tgross35 commented Aug 8, 2024

This seems reasonable to me, thanks for the fix

@bors r+

@bors
Copy link
Contributor

bors commented Aug 8, 2024

📌 Commit 302ae8b has been approved by tgross35

It is now in the queue for this repository.

@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 8, 2024
@RalfJung
Copy link
Member Author

RalfJung commented Aug 8, 2024

@bors r-
Actually, it fails to build...

  0.557143   error[E0425]: cannot find value `TOL_P2` in this scope
  0.000053      --> std/src/f16/tests.rs:613:60
  0.000010       |
  0.000006   613 |     assert_approx_eq!((-5.8f16).to_degrees(), -332.315521, TOL_P2);
  0.000005       |                                                            ^^^^^^ not found in this scope

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 8, 2024
@RalfJung
Copy link
Member Author

RalfJung commented Aug 8, 2024

These here use a constant that is gated on reliable_f16, but the test does not have that gate:

assert_approx_eq!((-5.8f16).to_degrees(), -332.315521, TOL_P2);
assert_approx_eq!(pi.to_degrees(), 180.0, TOL_P2);

@tgross35
Copy link
Contributor

tgross35 commented Aug 8, 2024

Can you change the gates on the constants to allow(unused)?

@RalfJung
Copy link
Member Author

RalfJung commented Aug 8, 2024

Now it seems to build. :)
@bors r=tgross35

@bors
Copy link
Contributor

bors commented Aug 8, 2024

📌 Commit 5d96870 has been approved by tgross35

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 8, 2024
@tgross35
Copy link
Contributor

tgross35 commented Aug 8, 2024

Thanks, r=me once CI passes. f128 has the same gate on a constant but I don’t think that one will fail (feel free to make the same change if it does).

@RalfJung
Copy link
Member Author

RalfJung commented Aug 8, 2024

rust-lang/miri-test-libstd#76 is looking good so the f128 case seems to be fine.

@tgross35
Copy link
Contributor

tgross35 commented Aug 8, 2024

I assume this is still better to have in-tree rather than always neeing the patch - feel free to cancel if that isn't accurate.

@bors r+

@bors
Copy link
Contributor

bors commented Aug 8, 2024

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Aug 8, 2024

📌 Commit 5d96870 has been approved by tgross35

It is now in the queue for this repository.

@tgross35
Copy link
Contributor

tgross35 commented Aug 8, 2024

Oh, I assumed the force push undid the r+ 🤦

@RalfJung
Copy link
Member Author

RalfJung commented Aug 8, 2024

It did, but I re-approved it. ;)

@tgross35
Copy link
Contributor

tgross35 commented Aug 8, 2024

Completely missed that, thanks github mobile view :)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 8, 2024
std float tests: special-case Miri in feature detection

Quick work-around to fix miri-test-libstd failures.

r? `@tgross35`
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 9, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#128640 (rwlock: disable 'frob' test in Miri on macOS)
 - rust-lang#128791 (Don't implement `AsyncFn` for `FnDef`/`FnPtr` that wouldnt implement `Fn`)
 - rust-lang#128806 (Split `ColorConfig` off of `HumanReadableErrorType`)
 - rust-lang#128818 (std float tests: special-case Miri in feature detection)
 - rust-lang#128834 (rustdoc: strip unreachable modules)
 - rust-lang#128836 (rustdoc-json: add a test for impls on private & hidden types)
 - rust-lang#128837 (Clippy subtree update)
 - rust-lang#128851 (Add comment that bors did not see pushed before it merged)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5f04617 into rust-lang:master Aug 9, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 9, 2024
Rollup merge of rust-lang#128818 - RalfJung:std-miri-floats, r=tgross35

std float tests: special-case Miri in feature detection

Quick work-around to fix miri-test-libstd failures.

r? ``@tgross35``
@RalfJung RalfJung deleted the std-miri-floats branch August 10, 2024 18:17
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.

4 participants