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

Use windows-sys in windows tests #3239

Merged
merged 2 commits into from
Dec 30, 2023
Merged

Conversation

beepster4096
Copy link
Contributor

This PR adds windows-sys to test_dependencies so that we don't have to write out windows api bindings for each test.

Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

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

This is great, thanks! I got one question though, see the review comment.

/// threads should be able to reacquire the lock while it is locked by multiple other threads in shared mode
fn all_shared() {
println!("all_shared");

let mut lock = null_mut();
let mut condvar = null_mut();
let mut lock = MaybeUninit::zeroed();
Copy link
Member

Choose a reason for hiding this comment

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

I think it'd be better to indicate the type of what we are allocating here. Type inference is great but it also makes this code pretty hard to follow if one dos not know the Windows API types by heart.

This applies everywhere in this PR.

@@ -84,9 +84,9 @@ dependencies = [

[[package]]
name = "getrandom"
version = "0.2.10"
version = "0.2.11"
Copy link
Member

Choose a reason for hiding this comment

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

Please avoid unrelated lockfile changes.

@RalfJung
Copy link
Member

Looks good, thanks :)
@bors r+

@bors
Copy link
Contributor

bors commented Dec 30, 2023

📌 Commit e5db7ca has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Dec 30, 2023

⌛ Testing commit e5db7ca with merge 27b5f4f...

bors added a commit that referenced this pull request Dec 30, 2023
Use `windows-sys` in windows tests

This PR adds `windows-sys` to `test_dependencies` so that we don't have to write out windows api bindings for each test.
@bors
Copy link
Contributor

bors commented Dec 30, 2023

💔 Test failed - checks-actions

@RalfJung
Copy link
Member

looks like macos being macos...
@bors retry

@bors
Copy link
Contributor

bors commented Dec 30, 2023

⌛ Testing commit e5db7ca with merge 667e5a4...

@bors
Copy link
Contributor

bors commented Dec 30, 2023

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 667e5a4 to master...

@bors bors merged commit 667e5a4 into rust-lang:master Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants