libtest: Wait for test threads to exit after they report completion#81367
Merged
bors merged 2 commits intorust-lang:masterfrom Jan 26, 2021
Merged
libtest: Wait for test threads to exit after they report completion#81367bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Otherwise we can miss bugs where a test reports that it succeeded but then panics within a TLS destructor. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Contributor
|
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
Member
|
@bors r+ |
Collaborator
|
📌 Commit 57c72ab has been approved by |
Contributor
|
failed in #81385 (comment) @bors r- rollup=iffy |
Contributor
Author
|
I guess that could happen if a test returns after timing out. Will fix. |
This reduces the total complexity of checking timeouts from quadratic to linear, and should also fix an unwrap of None on completion of an already timed-out test. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
aa2822c to
b05788e
Compare
dtolnay
approved these changes
Jan 25, 2021
Member
|
@bors r+ |
Collaborator
|
📌 Commit b05788e has been approved by |
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
andersk
added a commit
to andersk/rust
that referenced
this pull request
Feb 18, 2021
It is possible for different tests to collide to the same TestDesc when macros are involved. That is a bug, but it didn’t cause a panic until rust-lang#81367. For now, change the code to ignore this problem. Fixes rust-lang#81852. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Feb 19, 2021
libtest: Fix unwrap panic on duplicate TestDesc It is possible for different tests to collide to the same `TestDesc` when macros are involved. That is a bug, but it didn’t cause a panic until rust-lang#81367. For now, change the code to ignore this problem. Fixes rust-lang#81852. This will need to be applied to `beta` too.
cuviper
pushed a commit
to cuviper/rust
that referenced
this pull request
Mar 10, 2021
It is possible for different tests to collide to the same TestDesc when macros are involved. That is a bug, but it didn’t cause a panic until rust-lang#81367. For now, change the code to ignore this problem. Fixes rust-lang#81852. Signed-off-by: Anders Kaseorg <andersk@mit.edu> (cherry picked from commit 1605af0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Otherwise we can miss bugs where a test reports that it succeeded but then panics within a TLS destructor.
Example:
Before this fix,
cargo testincorrectly reports success.After this fix, the failure is visible. (The entire process is aborted due to #24479.)