1. 14 Jan, 2017 1 commit
  2. 13 Jan, 2017 3 commits
  3. 10 Jan, 2017 3 commits
  4. 09 Jan, 2017 6 commits
  5. 08 Jan, 2017 1 commit
    • Lucas Bremgartner's avatar
      x/net/bpf: cleanup TestAsmDisasm · da2b4fa2
      Lucas Bremgartner authored
      The "fake" jump conditions as well as the LoadExtension instructions
      are now disassembled correctly. Therefore the workaround to reassemble
      the disassembly is no longer necessary.
      
      This simplification was annonced already in golang/go#18470.
      
      Result of `go test -cover .` stays the same with this simplification.
      
      $ go test -cover golang.org/x/net/bpf
      ok  	golang.org/x/net/bpf	0.495s	coverage: 92.3% of statements
      
      Change-Id: I3f9eb46148287c76059437b773b80c4c99eb5b53
      Reviewed-on: https://go-review.googlesource.com/34951
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatt Layher <mdlayher@gmail.com>
      da2b4fa2
  6. 07 Jan, 2017 3 commits
  7. 06 Jan, 2017 3 commits
  8. 05 Jan, 2017 1 commit
  9. 02 Jan, 2017 1 commit
    • Meir Fischer's avatar
      http2: remove unnecessary TODO for trailer keys allocation · 69d4b8aa
      Meir Fischer authored
      strings.Join has two allocations:
      (1) []byte intermediate
      (2) final string conversion
      The comma-separated keys are ultimately stored in hpack.HeaderField.Value
      as a string so (2) is not wasteful. Because strings.Join is used so heavily
      I assume its implementation is optimal - (1) is necessary.
      Therefore, short of refactoring hpack.HeaderField's Value type, the status quo
      seems optimal.
      
      This TODO appears to have been copy-pasted from net/http/transfer.go
      However, the two cases are different. transfer.go has two allocations
      in addition to strings.Join: concatenation with literals and converting
      string to bytes in io.WriteString.
      
      Change-Id: I292203a6535dd2774f5bf45e7280b89aabb5d78d
      Reviewed-on: https://go-review.googlesource.com/34626Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      69d4b8aa
  10. 29 Dec, 2016 1 commit
  11. 15 Dec, 2016 7 commits
  12. 13 Dec, 2016 1 commit
    • Brad Fitzpatrick's avatar
      context: deflake tests under Go 1.6 · cfae461c
      Brad Fitzpatrick authored
      The context tests were flaky under Go 1.6 on Windows. Make them
      slower, but make up for the slowness by parallelizing them.
      
      These tests don't run on Go 1.7+ in the subrepo. They were deflaked in
      the standard library's context in Go 1.7.
      
      Updates golang/go#11811
      
      Change-Id: I8dc8d9e13e72e87b4444e92d2316dd95bd7d066d
      Reviewed-on: https://go-review.googlesource.com/34288
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      cfae461c
  13. 10 Dec, 2016 2 commits
    • Brad Fitzpatrick's avatar
      http2: speed up TestTransportFlowControl in short mode · b1a2d6e8
      Brad Fitzpatrick authored
      Updates golang/go#18273
      
      Change-Id: I2e7589d070a2953972bc8456d572edd616525266
      Reviewed-on: https://go-review.googlesource.com/34271
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarTom Bergan <tombergan@google.com>
      b1a2d6e8
    • Tom Bergan's avatar
      http2: don't flush a stream's write queue in sc.resetStream · 3d9a20a7
      Tom Bergan authored
      resetStream(st) queues a RST_STREAM frame and then calls closeStream(st).
      Unfortunately, closeStream(st) flushes any writes pending on st, which
      can drop the RST_STREAM that was just queued. (If we are lucky, the
      RST_STREAM will fit in the send buffer and won't be dropped, however,
      if we are unlucky the RST_STREAM will be dropped.)
      
      I fixed this bug by removing closeStream(st) from resetStream. Instead,
      closeStream happens after the RST_STREAM frame is written. This is a more
      direct implementation of the diagram in RFC 7540 Section 5.1, which says
      that a stream does not transition to "closed" until after the RST_STREAM
      has been sent.
      
      A side-effect is that the stream may stay open for longer than it did
      previously (since it won't close until *after* the RST_STREAM frame is
      actually written). Situations like the following are a problem:
      
      - Client sends a DATA frame that exceeds its flow-control window
      - Server returns streamError(ErrCodeFlowControl) from processData
      - RST_STREAM is queued behind other frames
      - Server process the request body and releases flow-control
      - Client sends another DATA frame, this one fits in the flow-control
        window. Server should NOT process this frame.
      
      To avoid the above problem, we set a bool st.resetQueued=true when
      RST_STREAM is queued, then ignore all future incoming HEADERS and DATA
      frames on that stream.
      
      I also removed st.sentReset and st.gotReset, which were used to ignore
      frames after RST_STREAM is sent. Now we just check if the stream is closed.
      
      Fixes golang/go#18111
      
      Change-Id: Ieb7c848989431add5b7d95f40d6d91db7edc4980
      Reviewed-on: https://go-review.googlesource.com/34238Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      3d9a20a7
  14. 08 Dec, 2016 2 commits
    • Brad Fitzpatrick's avatar
      http2: allow Transport to connect to https://[v6literal]/ without port · e31bd588
      Brad Fitzpatrick authored
      Fixes golang/go#18248
      
      Change-Id: I271fbcc68a86f20c57b258c2e25788908dafdd94
      Reviewed-on: https://go-review.googlesource.com/34143Reviewed-by: 's avatarTom Bergan <tombergan@google.com>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      e31bd588
    • Tom Bergan's avatar
      http2: log Framer reads and writes when a server test fails · cbed01e8
      Tom Bergan authored
      To help debug rare nondeterministic server_test failures, log Framer
      reads and writes. Sample output from an injected test failure:
      
      $ go test golang.org/x/net/http2
      --- FAIL: TestServer_Request_Reject_Pseudo_scheme_invalid (0.00s)
          server_test.go:998: server request made it to handler; should've been rejected
          server_test.go:514: got a *http2.HeadersFrame; want *RSTStreamFrame
          server_test.go:229: Framer read log:
              2016-12-07 17:06:11.907199013 Framer 0xc4212665b0: read SETTINGS len=18, settings: MAX_FRAME_SIZE=1048576, MAX_CONCURRENT_STREAMS=250, MAX_HEADER_LIST_SIZE=1048896
              2016-12-07 17:06:11.907523124 Framer 0xc4212665b0: read SETTINGS flags=ACK len=0
              2016-12-07 17:06:11.908090453 Framer 0xc4212665b0: read HEADERS flags=END_STREAM|END_HEADERS stream=1 len=48
          server_test.go:235: Framer write log:
              2016-12-07 17:06:11.907152927 Framer 0xc4212665b0: wrote SETTINGS len=0
              2016-12-07 17:06:11.907207016 Framer 0xc4212665b0: wrote SETTINGS flags=ACK len=0
              2016-12-07 17:06:11.907550525 Framer 0xc4212665b0: wrote HEADERS flags=END_STREAM|END_HEADERS stream=1 len=16
      
      Framer logs are written at the end of a test only if the test failed
      and only if http2debug!=2. (If http2debug=2, then Framer logs are already
      written to stdout.)
      
      Hopefully this will help debug flaky tests. Or it might not.
      The code is kind of ugly.
      
      Updates golang/go#18235
      
      Change-Id: I74c8ef82521d81f123663c98c883c71d9843964f
      Reviewed-on: https://go-review.googlesource.com/34130
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      cbed01e8
  15. 07 Dec, 2016 3 commits
    • Brad Fitzpatrick's avatar
      ipv4: deflake TestConnUnicastSocketOptions on Windows · 944c58e9
      Brad Fitzpatrick authored
      TestConnUnicastSocketOptions doesn't work on nacl, plan9, or windows,
      but the t.Skip at the top was missing the GOOS == "windows" check. (It
      was present in the ipv6 version of the test)
      
      The test than proceeded to try to run and set up a connection pair
      for testing. Here's what was happening.
      
      Goroutines are M (main, the client) and S (server, doing the Accept):
      
         M: net.Listen("tcp4", "127.0.0.1:0"), succeeds.
         M: defer ln.Close() enqueued.
         M: go acceptor() (start "S" (server) goroutine)
         M: net.Dial("tcp4", ln.Addr().String()), succeeds.
            Notably, it's connected to the kernel's TCP stack at this point.
            The userspace Accept hasn't run. Go's listen backlog is
            syscall.SOMAXCONN on Windows (which is fine).
         M: testUnicastSocketOptions:
            - finds that it's GOOS == "windows",
            - calls t.Skipf, which calls runtime.Goexit, runs deferred goroutines
         M: ln.Close() (previously deferred runs)
         M: test completes
      
      Then:
      
         S: server goroutine finally schedules
         S: c, err := ln.Accept(), gets an error (because it's closed)
            if err != nil {
                 t.Error(err)   // setting an error after test is done; bogus
      
      So, fix it both ways: skip the test earlier on "windows", and simplify
      the server goroutine and move the failing into the main goroutine.
      Also skip other tests earlier on Windows that will also t.Skip. They
      don't have goroutines, but might as well skip earlier.
      
      Fixes golang/go#17655
      
      Change-Id: I5d910d70943be37b2b4b56542ee98e42fc3acd71
      Reviewed-on: https://go-review.googlesource.com/34021
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarBryan Mills <bcmills@google.com>
      944c58e9
    • Mikio Hara's avatar
      ipv4: add missing IP_HDRINCL option on Windows · de22433a
      Mikio Hara authored
      Change-Id: Ibb7dacadef404f6fc4e6c744a5015835e580c97e
      Reviewed-on: https://go-review.googlesource.com/34094
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      de22433a
    • Mikio Hara's avatar
      nettest: update comment on MakePipe · 97730608
      Mikio Hara authored
      To warn about the provided stop function should not be nil.
      
      Change-Id: I73351b6379ae22e85298ce9e87ee80077f748c7e
      Reviewed-on: https://go-review.googlesource.com/34091
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
      97730608
  16. 06 Dec, 2016 2 commits