-
Notifications
You must be signed in to change notification settings - Fork 29
Tests | Data Races eliminated #91
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
Conversation
Uh, the tests have been passing on my machine so I'm not quite sure. Per the documentation it says that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split into two commits.
One for the race condition.
One for the assert changes.
Seems like |
Cleaned! |
Thanks! |
This PR addresses issue #89 by fixing a data race conditions and removing duplicate checks in the test suite.
Changes
internal/keyring/threadkeyring.go
- Added error channel to prevent passage of non-initialized errors between goroutines (Now works with --race flag).cmd/ssh-tpm-agent/main_test.go
- launching shell after Stdout is assigned and waiting for the exit.internal/keyring/threadkeyring_test.go
Notes
I noticed that keyring.ReadKey appears to return syscall.ENOENT when given unknown key, not syscall.ENOKEY as the test expects.
Also
unix.RequestKey(X, description, "", destKeyring)
will returnENOENT
with X="user" and "logon", whilstENOKEY
with "Asdasdasd", etc.. Seems like an issue with keyring initialization on my system?