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

Add tests for Atomic*::fetch_{min,max} #82093

Merged
merged 3 commits into from
Feb 19, 2021
Merged

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Feb 14, 2021

This ensures that all atomic operations except for fences are tested. This has been useful to test my work on using atomic instructions for atomic operations in cg_clif instead of a global lock.

@rust-highfive
Copy link
Collaborator

r? @kennytm

(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 Feb 14, 2021
@kennytm
Copy link
Member

kennytm commented Feb 14, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 14, 2021

📌 Commit d1a541e has been approved by kennytm

@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 Feb 14, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 15, 2021
Add tests for Atomic*::fetch_{min,max}

This ensures that all atomic operations except for fences are tested. This has been useful to test my work on using atomic instructions for atomic operations in cg_clif instead of a global lock.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 15, 2021
Add tests for Atomic*::fetch_{min,max}

This ensures that all atomic operations except for fences are tested. This has been useful to test my work on using atomic instructions for atomic operations in cg_clif instead of a global lock.
@JohnTitor
Copy link
Member

Maybe this causes a failure on rollup (#82142 (comment)). But I'm leaving this since I'm not sure if this really causes it and another rollup is in the queue. If you're sure, please r- this and the rollup.

@bjorn3
Copy link
Member Author

bjorn3 commented Feb 15, 2021

This is very likely the cause. I think it requires a compiler-rt intrinsic on ARM that compiler-builtins doesn't implement.

@bors r-

@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 Feb 15, 2021
@bjorn3 bjorn3 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 Feb 16, 2021
@bjorn3
Copy link
Member Author

bjorn3 commented Feb 16, 2021

I disabled the tests on ARM.

@kennytm
Copy link
Member

kennytm commented Feb 17, 2021

I think this is only undefined on arm-android since __sync_fetch_and_u?(min|max)_4 do get defined on arm_linux. https://github.com/rust-lang/compiler-builtins/blob/e6fd1b272ff4cc34810e20126ffe17888a708f39/src/arm_linux.rs#L146-L150.

@bjorn3
Copy link
Member Author

bjorn3 commented Feb 17, 2021

I have also enabled them for arm-linux now.

@kennytm
Copy link
Member

kennytm commented Feb 18, 2021

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Feb 18, 2021

📌 Commit 4fa9e08 has been approved by kennytm

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 18, 2021
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 18, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2021
Rollup of 10 pull requests

Successful merges:

 - rust-lang#79747 (Add explanations and suggestions to `irrefutable_let_patterns` lint)
 - rust-lang#81496 (name async generators something more human friendly in type error diagnostic)
 - rust-lang#81873 (Add Mutex::unlock)
 - rust-lang#82093 (Add tests for Atomic*::fetch_{min,max})
 - rust-lang#82238 (ast: Keep expansion status for out-of-line module items)
 - rust-lang#82245 (Do not ICE when evaluating locals' types of invalid `yield`)
 - rust-lang#82259 (Fix popping singleton paths in when generating E0433)
 - rust-lang#82261 (rustdoc: Support argument files)
 - rust-lang#82274 (libtest: Fix unwrap panic on duplicate TestDesc)
 - rust-lang#82275 (Update cargo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f8b61d8 into rust-lang:master Feb 19, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 19, 2021
@bjorn3 bjorn3 deleted the more_atomic_tests branch February 19, 2021 11:31
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