- 03 Nov, 2016 38 commits
-
-
Brad Fitzpatrick authored
From the doc comment: Context returns the context for the current test or benchmark. The context is cancelled when the test or benchmark finishes. A goroutine started during a test or benchmark can wait for the context's Done channel to become readable as a signal that the test or benchmark is over, so that the goroutine can exit. Fixes #16221. Fixes #17552. Change-Id: I657df946be2c90048cc74615436c77c7d9d1226c Reviewed-on: https://go-review.googlesource.com/31724Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
So that testing can use context in its public API. For #16221. Change-Id: I6263fa7266c336c9490f20164ce79336df44a57e Reviewed-on: https://go-review.googlesource.com/32648 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Emmanuel Odeke authored
Updates #16360. Change-Id: I5bf13d3367e68c5d8435f6ef2161d5a74cc747a7 Reviewed-on: https://go-review.googlesource.com/29611Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Before: $ go test -race -v -run TestRace === RUN TestRace ================== WARNING: DATA RACE Write at 0x00c420076420 by goroutine 7: _/Users/rsc/go/src/cmd/go/testdata/src/testrace.TestRace.func1() /Users/rsc/go/src/cmd/go/testdata/src/testrace/race_test.go:10 +0x3b Previous write at 0x00c420076420 by goroutine 6: _/Users/rsc/go/src/cmd/go/testdata/src/testrace.TestRace() /Users/rsc/go/src/cmd/go/testdata/src/testrace/race_test.go:13 +0xcc testing.tRunner() /Users/rsc/go/src/testing/testing.go:656 +0x104 Goroutine 7 (running) created at: _/Users/rsc/go/src/cmd/go/testdata/src/testrace.TestRace() /Users/rsc/go/src/cmd/go/testdata/src/testrace/race_test.go:12 +0xbb testing.tRunner() /Users/rsc/go/src/testing/testing.go:656 +0x104 Goroutine 6 (running) created at: testing.(*T).Run() /Users/rsc/go/src/testing/testing.go:693 +0x536 testing.runTests.func1() /Users/rsc/go/src/testing/testing.go:877 +0xaa testing.tRunner() /Users/rsc/go/src/testing/testing.go:656 +0x104 testing.runTests() /Users/rsc/go/src/testing/testing.go:883 +0x4ac testing.(*M).Run() /Users/rsc/go/src/testing/testing.go:818 +0x1c3 main.main() _/Users/rsc/go/src/cmd/go/testdata/src/testrace/_test/_testmain.go:42 +0x20f ================== --- PASS: TestRace (0.00s) PASS Found 1 data race(s) FAIL _/Users/rsc/go/src/cmd/go/testdata/src/testrace 1.026s $ After: $ go test -race -v -run TestRace === RUN TestRace ================== WARNING: DATA RACE Write at 0x00c420076420 by goroutine 7: _/Users/rsc/go/src/cmd/go/testdata/src/testrace.TestRace.func1() /Users/rsc/go/src/cmd/go/testdata/src/testrace/race_test.go:10 +0x3b Previous write at 0x00c420076420 by goroutine 6: _/Users/rsc/go/src/cmd/go/testdata/src/testrace.TestRace() /Users/rsc/go/src/cmd/go/testdata/src/testrace/race_test.go:13 +0xcc testing.tRunner() /Users/rsc/go/src/testing/testing.go:656 +0x104 Goroutine 7 (running) created at: _/Users/rsc/go/src/cmd/go/testdata/src/testrace.TestRace() /Users/rsc/go/src/cmd/go/testdata/src/testrace/race_test.go:12 +0xbb testing.tRunner() /Users/rsc/go/src/testing/testing.go:656 +0x104 Goroutine 6 (running) created at: testing.(*T).Run() /Users/rsc/go/src/testing/testing.go:693 +0x536 testing.runTests.func1() /Users/rsc/go/src/testing/testing.go:877 +0xaa testing.tRunner() /Users/rsc/go/src/testing/testing.go:656 +0x104 testing.runTests() /Users/rsc/go/src/testing/testing.go:883 +0x4ac testing.(*M).Run() /Users/rsc/go/src/testing/testing.go:818 +0x1c3 main.main() _/Users/rsc/go/src/cmd/go/testdata/src/testrace/_test/_testmain.go:42 +0x20f ================== --- FAIL: TestRace (0.00s) testing.go:609: race detected during execution of test FAIL FAIL _/Users/rsc/go/src/cmd/go/testdata/src/testrace 0.022s $ Fixes #15972. Change-Id: Idb15b8ab81d65637bb535c7e275595ca4a6e450e Reviewed-on: https://go-review.googlesource.com/32615 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dan Harrington authored
- Added support for If-Match and If-Unmodified-Since. - Precondition checks now more strictly follow RFC 7232 section 6, which affects precedence when multiple condition headers are present. - When serving a 304, Last-Modified header is now removed when no ETag is present (as suggested by RFC 7232 section 4.1). - If-None-Match supports multiple ETags. - ETag comparison now correctly handles weak ETags. Fixes #17572 Change-Id: I35039dea6811480ccf2889f8ed9c6a39ce34bfff Reviewed-on: https://go-review.googlesource.com/32014Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
See https://go-review.googlesource.com/32581. This makes x/tools/go/gcimporter15/bimport.go a close copy again and the importer more robust. Change-Id: If96ad6acd611878b7dfa6a13d005d847ece82ab6 Reviewed-on: https://go-review.googlesource.com/32647 TryBot-Result: Gobot Gobot <gobot@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
-
Mohit Agarwal authored
Fixes #17772 Change-Id: I0f2094400c454828aa57a8d172dadeac4ddb6d35 Reviewed-on: https://go-review.googlesource.com/32691Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Chase authored
Newer versions of gcc notice a type mismatch and complain. Fix code to match documented signature in MSDN. Trybots say this still compiles with the older (5.1) version of gcc. Fixes #17771. Change-Id: Ib3fe6f71b40751e1146249e31232da5ac69b9e00 Reviewed-on: https://go-review.googlesource.com/32646 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
This matches exposing CertificateInvalidError.Cert. and (exposing but not the spelling of) HostnameError.Certificate. Fixes #13519. Change-Id: Ifae9a09e063d642c09de3cdee8a728ff06d3a5df Reviewed-on: https://go-review.googlesource.com/32644 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
A bit contrived to come up with an example, but it happened in #15836, somehow. $ cat /tmp/x.go package main /* #include <stddef.h> int foo(void); int foo(void) { return 2; } #define int asdf */ import "C" func main() { println(C.foo()) } $ go run /tmp/x.go # command-line-arguments cgo-builtin-prolog:9:31: error: unknown type name 'asdf' <<<<< _GoString_ GoStringN(char *p, int l); ^ /tmp/x.go:12:13: note: expanded from macro 'int' #define int asdf ^ cgo-builtin-prolog:10:28: error: unknown type name 'asdf' <<<<< _GoBytes_ GoBytes(void *p, int n); ^ /tmp/x.go:12:13: note: expanded from macro 'int' #define int asdf ^ 2 errors generated. The two marked lines used to refer incorrectly to /tmp/x.go. Fixes #15836. Change-Id: I08ef60a53cfd148112fceb651eaf7b75d94a7a8d Reviewed-on: https://go-review.googlesource.com/32613 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Consider a switch like switch x { case foo: f() g() } Before, the coverage annotation for the block calling f and g included in its position span the text for 'case foo:'. This looks nice in the coverage report, but it breaks the invariant that coverage blocks are disjoint if you have a more complex expression like: switch x { case func() int { return foo }(): f() g() } Then the coverage analysis wants to annotate the func literal body, which overlaps with the case body, because the case body is considered to begin at the case token. Change the annotation for a case body to start just after the colon of the case clause, avoiding any potential conflict with complex case expressions. Could have started at the colon instead, but it seemed less weird to start just after it. Fixes #16540. Change-Id: I1fec4bc2a53c7092e649dc0d4be1680a697cb79b Reviewed-on: https://go-review.googlesource.com/32612 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Russ Cox authored
Clear it before any tests begin. Clear it again after TestIsSecureGitAllowProtocol sets it. Fixes #17700. Change-Id: I6ea50d37f8222d8c7c9fee0b1eac3bbdfb5d133e Reviewed-on: https://go-review.googlesource.com/32640Reviewed-by: Quentin Smith <quentin@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
-
Russ Cox authored
The goal of the test is to provoke a custom import path check error, which will contain the current repo path, to see that it says ssh:// in it. But the fix to #16471 made the test no longer provoke that error. Provoke the error by checking out from rsc.io instead of github.com/rsc. Fixes #17701. Change-Id: I750ffda2ff59c2be8e111d26160997214a73fd9a Reviewed-on: https://go-review.googlesource.com/32641 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
This matches the removal of .so files and makes the processing of '-L/path/to -lfoo' and plain '/path/to/foo.a' match. Fixes #16463. Change-Id: I1464c5390d7eb6a3a33b4b2c951f87ef392ec94a Reviewed-on: https://go-review.googlesource.com/32642 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Fixes #16712. Change-Id: Ib216059c6c0c952162c19e080dcf3799f0652a8d Reviewed-on: https://go-review.googlesource.com/32171 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Quentin Smith <quentin@golang.org>
-
Russ Cox authored
Fixes #17689. Change-Id: I45a14e6bf4b2647431105f3e0b63b7076b6655d2 Reviewed-on: https://go-review.googlesource.com/32635 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Not "J", not "JAN", not "jan", etc. Fixes #17523. Change-Id: I16b5da97e73d88c6680c36401d30f8a195061527 Reviewed-on: https://go-review.googlesource.com/32636 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Cover-annotated cgo-rebuilt package for xtest was not linked into package graph and so not being rebuilt. Link into package graph. Fixes #13625. Change-Id: I685f7276f92bbc85fbc4b389111c83d9fe517637 Reviewed-on: https://go-review.googlesource.com/32614 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
The test case was importing golang.org/x/build/cmd/cl, which is a package main and cannot be imported. The test case (stored in a separate repo) has been changed to import golang.org/x/build/gerrit. Update the test accordingly. Fixes #17702. Change-Id: I80e150092111b5a04bb00c992b32edb271edb086 Reviewed-on: https://go-review.googlesource.com/32616 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Fixes #15410. Change-Id: I9964d0162a3cae690afeb889b1822cf79c80b89a Reviewed-on: https://go-review.googlesource.com/32639 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Robert Griesemer authored
Change-Id: I5a74be1593dca8ba5e0829f0bae35dc9ce702671 Reviewed-on: https://go-review.googlesource.com/32672Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Quentin Smith authored
OpenBSD's scheduler causes preemption to take 20+ms, so 30ms is not enough time for 3 goroutines to run. This change continues to sleep for 30ms, but if it finds that the 3 goroutines have not run, it sleeps for an additional 1s before declaring failure. Updates #17712 Change-Id: I3e886e40d05192b7cb71b4f242af195836ef62a8 Reviewed-on: https://go-review.googlesource.com/32634Reviewed-by: Rick Hudson <rlh@golang.org> Run-TryBot: Quentin Smith <quentin@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Some of these whitelist entries could be eliminated, e.g. by the addition of Go declarations, but this is a start. Change-Id: I2fb3234cf05ebc6b161aacac2d4c15d810d50527 Reviewed-on: https://go-review.googlesource.com/32671Reviewed-by: Michael Munday <munday@ca.ibm.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Found by vet. Change-Id: I1d78454facdd3522509ecfe7c73b21c4602ced8a Reviewed-on: https://go-review.googlesource.com/32670 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Munday <munday@ca.ibm.com>
-
Josh Bleecher Snyder authored
No functional changes. Change-Id: Ibf592c04be506a76577d48574e84ab20c3238b49 Reviewed-on: https://go-review.googlesource.com/32589 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Munday <munday@ca.ibm.com>
-
Mohit Agarwal authored
Follow-up to CL 32114 Change-Id: I75247ed9c1c0a0e8a278eb75a60d4c5bee355409 Reviewed-on: https://go-review.googlesource.com/32690Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Fixes #15877. Change-Id: Ia1e327c0cea3be43e5f8ba637c97c223cee4bb5a Reviewed-on: https://go-review.googlesource.com/32643 TryBot-Result: Gobot Gobot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
The original go tool pprof (written in Perl) got this right. The Go rewrite never has, but should. Change-Id: Ie1fc571214c61b1b5654a0bc90e15eb889adf059 Reviewed-on: https://go-review.googlesource.com/32617 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
The exported symbol for a plugin can be the only reference to a type in a program. In particular, "var F func()" will have the type *func(), which is uncommon. Fixes #17140 Change-Id: Ide2104edbf087565f5377374057ae54e0c00c57e Reviewed-on: https://go-review.googlesource.com/29692 Run-TryBot: David Crawshaw <crawshaw@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
David du Colombier authored
Since Dial(":80") was implemented on Plan 9 (CL 32593), TestProtocolDialError is failing because dialing a port superior to 65535 is supported on Plan 9. This change disallows dialing and listening on ports superior to 65535. Fixes #17761. Change-Id: I95e8a163eeacf1ccd8ece7b650f16a0531c59709 Reviewed-on: https://go-review.googlesource.com/32594Reviewed-by: Russ Cox <rsc@golang.org>
-
David du Colombier authored
CL 32101 fixed Dial(":80") on Windows and added TestDialLocal, which was failing on Plan 9, because it wasn't implemented on Plan 9. This change implements Dial(":80") by connecting to 127.0.0.1 or ::1 (depending on network), so it works as documented. Fixes #17760. Change-Id: If0ff769299e09bebce11fc3708639c1d8c96c280 Reviewed-on: https://go-review.googlesource.com/32593Reviewed-by: Russ Cox <rsc@golang.org>
-
Josh Bleecher Snyder authored
Fixes #17755 Change-Id: I1ad1edc382b1312d992963054eb82648cb5112d2 Reviewed-on: https://go-review.googlesource.com/32588 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Ilya Tocar authored
Generate bswap+load/store for reading/writing big endian data. Helps encoding/binary. name old time/op new time/op delta ReadSlice1000Int32s-8 5.06µs ± 8% 4.58µs ± 8% -9.50% (p=0.000 n=10+10) ReadStruct-8 1.07µs ± 0% 1.05µs ± 0% -1.51% (p=0.000 n=9+10) ReadInts-8 367ns ± 0% 363ns ± 0% -1.15% (p=0.000 n=8+9) WriteInts-8 475ns ± 1% 469ns ± 0% -1.45% (p=0.000 n=10+10) WriteSlice1000Int32s-8 5.03µs ± 3% 4.50µs ± 3% -10.45% (p=0.000 n=9+9) PutUvarint32-8 17.2ns ± 0% 17.2ns ± 0% ~ (all samples are equal) PutUvarint64-8 46.7ns ± 0% 46.7ns ± 0% ~ (p=0.509 n=10+10) name old speed new speed delta ReadSlice1000Int32s-8 791MB/s ± 8% 875MB/s ± 8% +10.53% (p=0.000 n=10+10) ReadStruct-8 70.0MB/s ± 0% 71.1MB/s ± 0% +1.54% (p=0.000 n=9+10) ReadInts-8 81.6MB/s ± 0% 82.6MB/s ± 0% +1.21% (p=0.000 n=9+9) WriteInts-8 63.0MB/s ± 1% 63.9MB/s ± 0% +1.45% (p=0.000 n=10+10) WriteSlice1000Int32s-8 796MB/s ± 4% 888MB/s ± 3% +11.65% (p=0.000 n=9+9) PutUvarint32-8 233MB/s ± 0% 233MB/s ± 0% ~ (p=0.089 n=10+10) PutUvarint64-8 171MB/s ± 0% 171MB/s ± 0% ~ (p=0.137 n=10+9) Change-Id: Ia2dbdef92198eaa7e2af5443a8ed586d4b401ffb Reviewed-on: https://go-review.googlesource.com/32222 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
Follow-up to CL 32551. Change-Id: If68f9581a7f13e04796aaff2007c09f8ea2c3611 Reviewed-on: https://go-review.googlesource.com/32586 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Hiroshi Ioka authored
The old code cannot handle unexported fields, it panics. The new code returns error instead. Fixes #17462 Change-Id: I927fc46b21d60e86cb52e84c65f2122f9159b21d Reviewed-on: https://go-review.googlesource.com/31540 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
Fixes #17754 Updates #9478 (details in here) Change-Id: Iae2c1ca05a18ed266b53b2594c22fc57fab33c5e Reviewed-on: https://go-review.googlesource.com/32587 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
TestAssembly takes 20s on my machine, which is too slow for normal operation. Marking as -short has its dangers (#17472), but hopefully we'll soon have a builder for that. All the SSA tests are hermetic and not time sensitive and can thus be run in parallel. Reduces the cmd/compile/internal/gc test time during all.bash on my laptop from 42s to 7s. Updates #17751 Change-Id: Idd876421db23b9fa3475e8a9b3355a5dc92a5a29 Reviewed-on: https://go-review.googlesource.com/32585 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Updates http2 to x/net/http2 git rev 569280fa for: http2: fix over-aggressive ignoring of frames while in "go away" mode https://golang.org/cl/32583 Fixes #17733 Change-Id: I4008d2e14ce89782ce7e18b441b1181f98623b9d Reviewed-on: https://go-review.googlesource.com/32584 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
- 02 Nov, 2016 2 commits
-
-
Robert Griesemer authored
Change-Id: I4b035b3539c98e5b1442d1009d457cbc199b42ee Reviewed-on: https://go-review.googlesource.com/32637Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Michael Munday authored
Adapted from the mips64 test case. Fixes #17745. Change-Id: I46f0900028adb936dcab2cdc701ea11d0a3cb95e Reviewed-on: https://go-review.googlesource.com/32611 Run-TryBot: Michael Munday <munday@ca.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Rob Pike <r@golang.org>
-