Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3037)

Issue 11781043: code review 11781043: go.crypto/ssh: Use net.UnixConn for connecting client a... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by hanwen-google
Modified:
10 years, 7 months ago
Reviewers:
agl1, jpsugar
CC:
dfc, agl1, albert.strasheim, golang-dev
Visibility:
Public.

Description

go.crypto/ssh: Use net.UnixConn for connecting client and sshd. This obviates custom code to emulate a thread-safe connection. Use this for testing that listeners close if the connection breaks.

Patch Set 1 #

Patch Set 2 : diff -r c0932d3462e8 https://code.google.com/p/go.crypto #

Total comments: 5

Patch Set 3 : diff -r c0932d3462e8 https://code.google.com/p/go.crypto #

Patch Set 4 : diff -r c0932d3462e8 https://code.google.com/p/go.crypto #

Patch Set 5 : diff -r 1e7a3e301825 https://code.google.com/p/go.crypto #

Total comments: 2

Patch Set 6 : diff -r 5c2f63878818 https://code.google.com/p/go.crypto #

Patch Set 7 : diff -r 5c2f63878818 https://code.google.com/p/go.crypto #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -84 lines) Patch
M ssh/test/forward_unix_test.go View 1 2 3 4 5 6 1 chunk +34 lines, -2 lines 0 comments Download
M ssh/test/test_unix_test.go View 1 2 3 4 5 4 chunks +45 lines, -82 lines 0 comments Download

Messages

Total messages: 18
hanwen-google
Hello dave@cheney.net, agl@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.crypto
10 years, 9 months ago (2013-07-24 20:18:23 UTC) #1
hanwen-google
tested with go test -race ; the result is clean.
10 years, 9 months ago (2013-07-24 20:20:34 UTC) #2
hanwen-google
https://codereview.appspot.com/11781043/diff/2001/ssh/test/forward_unix_test.go File ssh/test/forward_unix_test.go (right): https://codereview.appspot.com/11781043/diff/2001/ssh/test/forward_unix_test.go#newcode176 ssh/test/forward_unix_test.go:176: server.clientConn.Close() I tried closing the server-side too, but for ...
10 years, 9 months ago (2013-07-24 20:22:03 UTC) #3
albert.strasheim
On 2013/07/24 20:22:03, hanwen wrote: > https://codereview.appspot.com/11781043/diff/2001/ssh/test/forward_unix_test.go > File ssh/test/forward_unix_test.go (right): > > https://codereview.appspot.com/11781043/diff/2001/ssh/test/forward_unix_test.go#newcode176 > ...
10 years, 9 months ago (2013-07-25 01:26:35 UTC) #4
dfc
Very nice, I like the way TryDial will have cleaned up everything on disk before ...
10 years, 9 months ago (2013-07-25 11:18:08 UTC) #5
hanwen-google
Socketpair has an inherent race condition: socketpair will give you 2 file descriptors, and if ...
10 years, 9 months ago (2013-07-25 13:13:21 UTC) #6
hanwen-google
Sorry - not enough coffee. On Thu, Jul 25, 2013 at 10:13 AM, Han-Wen Nienhuys ...
10 years, 9 months ago (2013-07-25 13:14:15 UTC) #7
hanwen-google
I tried closing the server side too, but couldn't get it to work. https://codereview.appspot.com/11781043/diff/2001/ssh/test/test_unix_test.go File ...
10 years, 9 months ago (2013-07-25 14:08:37 UTC) #8
hanwen-google
ping?
10 years, 8 months ago (2013-08-16 16:47:39 UTC) #9
hanwen-google
Ping? Adam, you have an opinion?
10 years, 7 months ago (2013-08-28 16:03:50 UTC) #10
agl1
LGTM https://codereview.appspot.com/11781043/diff/27001/ssh/test/test_unix_test.go File ssh/test/test_unix_test.go (right): https://codereview.appspot.com/11781043/diff/27001/ssh/test/test_unix_test.go#newcode165 ssh/test/test_unix_test.go:165: listener.Close() This appears to duplicate the defer on ...
10 years, 7 months ago (2013-08-28 16:28:51 UTC) #11
hanwen-google
https://codereview.appspot.com/11781043/diff/27001/ssh/test/test_unix_test.go File ssh/test/test_unix_test.go (right): https://codereview.appspot.com/11781043/diff/27001/ssh/test/test_unix_test.go#newcode165 ssh/test/test_unix_test.go:165: listener.Close() On 2013/08/28 16:28:52, agl1 wrote: > This appears ...
10 years, 7 months ago (2013-08-28 16:40:35 UTC) #12
agl1
*** Submitted as https://code.google.com/p/go/source/detail?r=5d03cdb555ef&repo=crypto *** go.crypto/ssh: Use net.UnixConn for connecting client and sshd. This obviates ...
10 years, 7 months ago (2013-08-28 16:42:09 UTC) #13
hanwen-google
*** Abandoned ***
10 years, 7 months ago (2013-08-28 16:50:30 UTC) #14
jpsugar
Doh, I missed this one. Does net.Pipe() not work?
10 years, 7 months ago (2013-08-28 22:20:36 UTC) #15
hanwen-google
with net.Pipe, the thing deadlocks on shutdown. I guess some part of the piping needs ...
10 years, 7 months ago (2013-08-29 11:57:47 UTC) #16
jpsugar
Oh, I see. You can't use net.Pipe because it doesn't support File(). And I suppose ...
10 years, 7 months ago (2013-08-29 17:08:20 UTC) #17
jpsugar
10 years, 7 months ago (2013-08-29 17:12:38 UTC) #18
For the record -- the parts of the pipe that you pass to the
subprocess have to be closed in the parent. r2.Close() w1.Close()
would probably have fixed it.

On Thu, Aug 29, 2013 at 4:57 AM, Han-Wen Nienhuys <hanwen@google.com> wrote:
> with net.Pipe, the thing deadlocks on shutdown. I guess some part of
> the piping needs to be closed before Wait()ing, but did not look more
> closely.
>
> On Thu, Aug 29, 2013 at 12:20 AM,  <jpsugar@google.com> wrote:
>> Doh, I missed this one. Does net.Pipe() not work?
>
>
>
> --
> Han-Wen Nienhuys
> Google Munich
> hanwen@google.com
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b