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

Issue 7693053: code review 7693053: os/exec: deflake test (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by bradfitz
Modified:
10 years, 12 months ago
Reviewers:
dvyukov, golang-dev
Visibility:
Public.

Description

os/exec: deflake test Don't block the httptest server shutting down by having a response body outstanding unread. Just do a HEAD instead of a GET. Same desired side-effect either way, but won't have a body. Fixes issue 5123 (maybe)

Patch Set 1 #

Patch Set 2 : diff -r f78c5036b7f6 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r f78c5036b7f6 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/pkg/os/exec/exec_test.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 1 month ago (2013-03-25 17:23:23 UTC) #1
dvyukov
The read goroutine is still blocked in tls handshake, so will it actually help?
11 years, 1 month ago (2013-03-25 17:27:28 UTC) #2
bradfitz
No clue. I can't reproduce so I was just guessing. On Mon, Mar 25, 2013 ...
11 years, 1 month ago (2013-03-25 17:29:43 UTC) #3
dvyukov
11 years, 1 month ago (2013-03-25 17:31:38 UTC) #4
Just in case, I have this patch applied:

diff -r ccdacf6833dc src/pkg/os/exec/exec.go
--- a/src/pkg/os/exec/exec.go Sat Mar 23 02:17:01 2013 +1100
+++ b/src/pkg/os/exec/exec.go Fri Mar 22 08:32:50 2013 -0700
@@ -235,8 +235,8 @@
 // Start starts the specified command but does not wait for it to complete.
 func (c *Cmd) Start() error {
  if c.err != nil {
- c.closeDescriptors(c.closeAfterStart)
- c.closeDescriptors(c.closeAfterWait)
+ //c.closeDescriptors(c.closeAfterStart)
+ //c.closeDescriptors(c.closeAfterWait)
  return c.err
  }
  if c.Process != nil {
diff -r ccdacf6833dc src/pkg/os/exec/exec_test.go
--- a/src/pkg/os/exec/exec_test.go Sat Mar 23 02:17:01 2013 +1100
+++ b/src/pkg/os/exec/exec_test.go Fri Mar 22 08:32:50 2013 -0700
@@ -154,7 +154,7 @@
 //  Issue 5071
 func TestPipeLookPathLeak(t *testing.T) {
  fd0 := numOpenFDS(t)
- for i := 0; i < 4; i++ {
+ for i := 0; i < 2000; i++ {
  cmd := Command("something-that-does-not-exist-binary")
  cmd.StdoutPipe()
  cmd.StderrPipe()



and run with go test -cpu=1,2,3,4,5,6,7,8 os/exec

On Mon, Mar 25, 2013 at 9:29 PM, Brad Fitzpatrick <bradfitz@golang.org> wrote:
> No clue. I can't reproduce so I was just guessing.
>
>
> On Mon, Mar 25, 2013 at 10:27 AM, <dvyukov@google.com> wrote:
>>
>> The read goroutine is still blocked in tls handshake, so will it
>> actually help?
>>
>> https://codereview.appspot.com/7693053/
>
>
Sign in to reply to this message.

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