-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix a deadlocking test with master libgit2 #7179
Merged
Merged
Conversation
This file contains 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
r? @ehuss (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Jul 25, 2019
This commit fixes a test in Cargo to work around a seeming regression in behavior in libgit2 around HTTP authentication. The expected flow for HTTP authentication with git is that git sends an HTTP request and receives an "unauthorized" response. It then sends another request with authorization information and that's what we're testing is received in the our test. Previously libgit2 would issue a new HTTP connection if the previous one was closed, but it looks like changes in libgit2 now require that the same HTTP connection is used for the initial request and the subsequent request with authorization information. This broke our test since it's not using an HTTP compliant server at all and is just some handwritten TCP reads/writes. The fix here is to basically stay with handwritten TCP reads/writes but tweak how it happens so it's all on the same HTTP/TCP connection to match what libgit2 is expecting. Some extra assertions have also been added to try to prevent deadlocks from happening in the future and instead make the test fail fast if this situation comes up again.
@bors r+ |
📌 Commit bd7fe89 has been approved by |
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
Jul 25, 2019
bors
added a commit
that referenced
this pull request
Jul 25, 2019
Fix a deadlocking test with master libgit2 This commit fixes a test in Cargo to work around a seeming regression in behavior in libgit2 around HTTP authentication. The expected flow for HTTP authentication with git is that git sends an HTTP request and receives an "unauthorized" response. It then sends another request with authorization information and that's what we're testing is received in the our test. Previously libgit2 would issue a new HTTP connection if the previous one was closed, but it looks like changes in libgit2 now require that the same HTTP connection is used for the initial request and the subsequent request with authorization information. This broke our test since it's not using an HTTP compliant server at all and is just some handwritten TCP reads/writes. The fix here is to basically stay with handwritten TCP reads/writes but tweak how it happens so it's all on the same HTTP/TCP connection to match what libgit2 is expecting. Some extra assertions have also been added to try to prevent deadlocks from happening in the future and instead make the test fail fast if this situation comes up again.
☀️ Test successful - checks-azure |
bors
added a commit
to rust-lang/rust
that referenced
this pull request
Aug 1, 2019
Update cargo, rls ## cargo 12 commits in d0f828419d6ce6be21a90866964f58eb2c07cd56..26092da337b948719549cd5ed3d1051fd847afd7 2019-07-23 21:58:59 +0000 to 2019-07-31 23:24:32 +0000 - tests: Enable features to fix unstabilized `#[bench]` (rust-lang/cargo#7198) - Fix excluding target dirs from backups on OSX (rust-lang/cargo#7192) - Handle symlinks to directories (rust-lang/cargo#6817) - Enable pipelined compilation by default (rust-lang/cargo#7143) - Refactor resolve `Method` (rust-lang/cargo#7186) - Update `cargo_compile` module doc. (rust-lang/cargo#7187) - Clean up TargetInfo (rust-lang/cargo#7185) - Fix some issues with absolute paths in dep-info files. (rust-lang/cargo#7137) - Update the `url` crate to 2.0 (rust-lang/cargo#7175) - Tighten requirements for git2 crates (rust-lang/cargo#7176) - Fix a deadlocking test with master libgit2 (rust-lang/cargo#7179) - Fix detection of cyclic dependencies through `[patch]` (rust-lang/cargo#7174) ## rls 1 commits in 70347b5d4dfe78eeb9e6f6db85f773c8d43cd22b..93d9538c6000fcf6c8da763ef4ce7a8d407b7d24 2019-07-30 12:56:38 +0200 to 2019-07-31 21:42:49 +0200 - Update cargo (rust-lang/rls#1529)
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.
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.
This commit fixes a test in Cargo to work around a seeming regression in
behavior in libgit2 around HTTP authentication. The expected flow for
HTTP authentication with git is that git sends an HTTP request and
receives an "unauthorized" response. It then sends another request with
authorization information and that's what we're testing is received in
the our test.
Previously libgit2 would issue a new HTTP connection if the previous one
was closed, but it looks like changes in libgit2 now require that the
same HTTP connection is used for the initial request and the subsequent
request with authorization information. This broke our test since it's
not using an HTTP compliant server at all and is just some handwritten
TCP reads/writes. The fix here is to basically stay with handwritten TCP
reads/writes but tweak how it happens so it's all on the same HTTP/TCP
connection to match what libgit2 is expecting.
Some extra assertions have also been added to try to prevent deadlocks
from happening in the future and instead make the test fail fast if this
situation comes up again.