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

Make threads test more robust #81

Merged
merged 3 commits into from Aug 13, 2020
Merged

Conversation

fabiim
Copy link
Contributor

@fabiim fabiim commented Aug 10, 2020

Fixes #80

Can handle the failure to obtain the name of a thread. This might
happen for different reasons (e.g., maybe the thread is not there
anymore). I'm keeping the error as the name to show in the assertions
failures.

Can handle the failure to obtain the name of a thread. This might
happen for different reaons (e.g., maybe the thread is not there
anymore). I'm keeping the error as the name to show in the assertions
failures.
src/target/linux.rs Outdated Show resolved Hide resolved
@fabiim
Copy link
Contributor Author

fabiim commented Aug 13, 2020

Seems the test instance got re-scheduled

src/target/linux.rs Outdated Show resolved Hide resolved
fabiim and others added 2 commits August 13, 2020 08:37
Should be safe to unwrap, the name method already handles threads that
have finished by returning None. So Err() results would have to be
some sort of bug.
Prevents an allocation in the happy case.

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
Copy link
Contributor

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

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

LGTM Thanks!

@bjorn3 bjorn3 merged commit 4176110 into headcrab-rs:master Aug 13, 2020
1 check passed
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.

Make threads test robust for disappearing threads
2 participants