Skip to content

Conversation

ChrisDenton
Copy link
Member

@ChrisDenton ChrisDenton commented Aug 30, 2025

Instead of sleeping, wait for the process to finish so that we can be sure it's done. We use a timeout because otherwise this test can be stuck indefinitely if it fails (unfortunately std doesn't currently have a way to wait with a timeout so a manual OS API call is necessary).

I also changed the test to run whoami and pipe the output to null so that it doesn't clutter up the test output.

Fixes #146024

@rustbot
Copy link
Collaborator

rustbot commented Aug 30, 2025

r? @tgross35

rustbot has assigned @tgross35.
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

@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 30, 2025
@tgross35
Copy link
Contributor

r=me with the try

@bors2 try jobs=aarch64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 30, 2025
Fix `sys::process::windows::tests::test_thread_handle` spurious failure

try-job: aarch64-msvc-1
@rust-bors
Copy link

rust-bors bot commented Aug 30, 2025

☀️ Try build successful (CI)
Build commit: 83c01c5 (83c01c599f9581fa61d3f3ce245a92f5effafbb5, parent: 0f506968010fa987b0d134034d0ccab9eecd9120)

@ChrisDenton
Copy link
Member Author

@bors r=tgross35 rollup

@bors
Copy link
Collaborator

bors commented Aug 30, 2025

📌 Commit 3516e25 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 30, 2025
bors added a commit that referenced this pull request Aug 30, 2025
Fix `sys::process::windows::tests::test_thread_handle` spurious failure

Instead of sleeping, wait for the process to finish so that we can be sure it's done. We use a timeout because otherwise this test can be stuck indefinitely if it fails (unfortunately std doesn't currently have a way to wait with a timeout so a manual OS API call is necessary).

I also changed the test to run `whoami` and pipe the output to null so that it doesn't clutter up the test output.

Fixes #146024
@bors
Copy link
Collaborator

bors commented Aug 30, 2025

⌛ Testing commit 3516e25 with merge b0c9f5a...

@tgross35
Copy link
Contributor

Put this in a rollup,
@bors retry

bors added a commit that referenced this pull request Aug 30, 2025
Rollup of 4 pull requests

Successful merges:

 - #144964 (std: clarify `OpenOptions` error for create without write access)
 - #146030 (Fix `sys::process::windows::tests::test_thread_handle` spurious failure)
 - #146035 (Update `browser-ui-test` version to `0.21.3`)
 - #146036 (Use move_file for rename in tracing)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b86c601 into rust-lang:master Aug 31, 2025
11 of 12 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 31, 2025
rust-timer added a commit that referenced this pull request Aug 31, 2025
Rollup merge of #146030 - ChrisDenton:wait-timeout, r=tgross35

Fix `sys::process::windows::tests::test_thread_handle` spurious failure

Instead of sleeping, wait for the process to finish so that we can be sure it's done. We use a timeout because otherwise this test can be stuck indefinitely if it fails (unfortunately std doesn't currently have a way to wait with a timeout so a manual OS API call is necessary).

I also changed the test to run `whoami` and pipe the output to null so that it doesn't clutter up the test output.

Fixes #146024
@ChrisDenton ChrisDenton deleted the wait-timeout branch August 31, 2025 09:19
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Sep 9, 2025
Fix `sys::process::windows::tests::test_thread_handle` spurious failure

Instead of sleeping, wait for the process to finish so that we can be sure it's done. We use a timeout because otherwise this test can be stuck indefinitely if it fails (unfortunately std doesn't currently have a way to wait with a timeout so a manual OS API call is necessary).

I also changed the test to run `whoami` and pipe the output to null so that it doesn't clutter up the test output.

Fixes rust-lang#146024
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.

sys::process::windows::tests::test_thread_handle spuriously failed on aarch64-pc-windows-msvc
4 participants