1
0
mirror of https://github.com/golang/go synced 2024-09-25 03:10:12 -06:00
Commit Graph

18154 Commits

Author SHA1 Message Date
David Symonds
d4c66a35ba runtime: add a test for randomised map iteration order.
Technically the spec does not guarantee that the iteration order is random,
but it is a property that we have consciously pursued, and so it seems
right to verify that our implementation does indeed randomise.

Update #6719.

R=khr, bradfitz
CC=golang-codereviews
https://golang.org/cl/47010043
2014-01-03 10:10:54 +11:00
Brad Fitzpatrick
3a765be98c A+C: Pavel Zinovkin (individual CLA)
Generated by addca.

R=gobot
CC=golang-codereviews
https://golang.org/cl/39780047
2014-01-02 11:00:14 -08:00
Shawn Smith
eaff83b98e encoding/hex: add Decode error test case
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/46880043
2014-01-02 10:34:21 -08:00
Shawn Smith
b38da05ab1 time: add tests for Duration.Nanoseconds, Duration.Minutes, and Duration.Hours
R=golang-codereviews, rsc, dave
CC=golang-codereviews
https://golang.org/cl/42440043
2014-01-02 21:01:18 +11:00
Dave Cheney
66730120fa encoding/json: add tests for InvalidUnmarshalError
R=golang-codereviews, shawn.p.smith
CC=golang-codereviews
https://golang.org/cl/41960047
2014-01-02 09:49:55 +11:00
Shawn Smith
4d239bcea2 bufio: improve NewReaderSize, Peek, and UnreadByte test coverage
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/42990045
2014-01-01 22:26:22 +11:00
Shawn Smith
a39f3b29ec encoding/json: improve omitempty test coverage
R=golang-codereviews, dave, bradfitz
CC=golang-codereviews
https://golang.org/cl/46250043
2014-01-01 17:54:06 +11:00
Shawn Smith
3c7d2e6af9 os: improve Readdir and Readdirnames test coverage
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/46450043
2014-01-01 16:40:52 +11:00
Shawn Smith
873271378b encoding/hex: add Decode test case with uppercase hex characters
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/46270043
2014-01-01 16:32:05 +11:00
Michael Stapelberg
592416a387 debug/elf: add C source for testdata executables
This source file, when compiled with gcc 4.4.3 on Ubuntu lucid,
corresponds instruction for instruction to the binaries in the same
directory.

Shipping this source code file resolves http://bugs.debian.org/716853

R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/46780043
2013-12-31 14:36:13 -08:00
Shawn Smith
e3040e2bba crypto/sha256: add tests for Size() and BlockSize()
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/46470043
2014-01-01 07:46:00 +11:00
David Symonds
8f3fc547d0 2014: Year of the Gopher.
R=adg, djd, mpvl, nigeltao
CC=golang-codereviews
https://golang.org/cl/46660043
2014-01-01 00:00:22 +11:00
Shawn Smith
0333e80d63 crypto/sha1: add tests for Size() and BlockSize()
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/46400044
2013-12-31 23:13:05 +11:00
Shawn Smith
a1731ac078 container/ring: add test for Move with empty Ring
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/46630044
2013-12-31 21:18:40 +11:00
Mikio Hara
b4571bdfe8 net: fix typo
R=golang-codereviews, bradfitz, dave
CC=golang-codereviews
https://golang.org/cl/46600043
2013-12-31 18:52:37 +09:00
Shawn Smith
dcf562dfb6 crypto/sha512: add tests for Size() and BlockSize()
R=golang-codereviews, bradfitz, dave
CC=golang-codereviews
https://golang.org/cl/43550047
2013-12-31 19:29:09 +11:00
Josh Bleecher Snyder
ff006982c3 text/template: don't panic when using AddParseTree with an unparsed template
Fixes #7032.

R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/43960045
2013-12-30 17:17:19 -08:00
Mihai Borobocea
8183ed19b9 spec: example shows wrong value for complex constant
Looks like a typo.
Fixes #7011.

R=golang-codereviews, r, bradfitz
CC=golang-codereviews
https://golang.org/cl/45350043
2013-12-30 13:29:56 -08:00
Brad Fitzpatrick
206eff7112 A+C: Mihai Borobocea (individual CLA)
Generated by addca.

R=gobot
CC=golang-codereviews
https://golang.org/cl/46540044
2013-12-30 13:29:38 -08:00
Keith Randall
0ea20bc981 cmd/6g: inline copies of up to 4 words in length.
This change fixes a serious performance regression
with reflect.Value growing to 4 words instead of 3.
The json benchmark was ~50% slower, with this change
it is ~5% slower (and the binary is 0.5% larger).

Longer term, we probably need to rethink our copy
generation.  Using REP is really expensive time-wise.
But inlining the copy grows the binary.

R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/44990043
2013-12-30 12:14:27 -08:00
Keith Randall
1cc2ff8fc7 runtime: use readrange instead of read to check for races
on map keys and values which are now passed by reference.

R=dvyukov, khr
CC=golang-codereviews
https://golang.org/cl/43490044
2013-12-30 12:03:56 -08:00
Richard Musiol
7ff57e2fa1 reflect: fixed method name in Slice3 error message
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/46500043
2013-12-30 11:41:01 -08:00
Shawn Smith
96ee10fb71 reflect: add DeepEqual slice of slice inequality test
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/46510043
2013-12-30 11:39:47 -08:00
Shawn Smith
2f5f193923 doc/contribute: golang-dev -> golang-codereviews
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/46320043
2013-12-29 11:11:28 -08:00
Shawn Smith
c989a0b2f7 reflect: remove length check for arrays in deepValueEqual
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/39910044
2013-12-29 11:05:30 -08:00
Shawn Smith
36c8c5f063 io: add tests for SectionReader ReadAt and Size
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/39200045
2013-12-29 22:38:05 +11:00
Shawn Smith
351caa4b91 crypto/hmac: add tests for Size() and BlockSize()
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/41320044
2013-12-29 20:56:05 +11:00
Dave Cheney
d2fe44d568 runtime: load runtime.goarm as a byte, not a word
Fixes #6952.

runtime.asminit was incorrectly loading runtime.goarm as a word, not a uint8 which made it subject to alignment issues on arm5 platforms.

Alignment aside, this also meant that the top 3 bytes in R11 would have been garbage and could not be assumed to be setting up the FPU reliably.

R=iant, minux.ma
CC=golang-codereviews
https://golang.org/cl/46240043
2013-12-29 15:25:34 +11:00
Ian Lance Taylor
672525a56e net: work around Solaris connect issue when server closes socket
On Solaris, if you do a in-progress connect, and then the
server accepts and closes the socket, the client's later
attempt to complete the connect will fail with EINVAL.  Handle
this case by assuming that the connect succeeded.  This code
is weird enough that it is implemented as Solaris-only so that
it doesn't hide a real error on a different OS.

Update #6828

R=golang-codereviews, bradfitz, dave
CC=golang-codereviews
https://golang.org/cl/46160043
2013-12-28 09:37:54 -08:00
Shawn Smith
872f5ffa09 bytes: add test for Contains
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/46140043
2013-12-28 20:33:05 +11:00
Shawn Smith
42cea1a452 archive/tar: add test case for passing nil to FileInfoHeader
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/44710044
2013-12-28 16:14:49 +11:00
Martin Olsson
5499034a71 all: fix a few spelling errors in source comments
R=golang-codereviews, dave, iant
CC=golang-codereviews
https://golang.org/cl/45750044
2013-12-27 08:59:02 -08:00
Ian Lance Taylor
3980aad49d A+C: Martin Olsson (individual CLA)
Generated by addca.

R=gobot
CC=golang-codereviews
https://golang.org/cl/46040043
2013-12-27 08:53:34 -08:00
Ian Lance Taylor
4aa521a77d net: use DialTimeout in TestSelfConnect
This avoids problems with systems that take a long time to
find out nothing is listening, while still testing for the
self-connect misfeature since a self-connect should be fast.
With this we may be able to remove the test for non-Linux
systems.

Tested (on GNU/Linux) by editing selfConnect in
tcpsock_posix.go to always return false and verifying that
TestSelfConnect then fails with and without this change.

Idea from Uros Bizjak.

R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/39200044
2013-12-27 08:49:47 -08:00
Shawn Smith
d1a9143669 strconv: add tests for FormatBool and AppendBool
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/42480043
2013-12-27 08:40:14 -08:00
Shawn Smith
f485e9859a strconv: remove unused atof32int function
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/44200044
2013-12-27 08:40:03 -08:00
Shawn Smith
4133407061 crypto/cipher: remove unused shift1 function
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/38990045
2013-12-27 08:39:54 -08:00
Brad Fitzpatrick
2ccc9a965b net/http: quiet distracting test spam
Capture log output (and test it while at it),
and quiet unnecessary t.Logf.

R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/45850043
2013-12-26 13:03:30 -08:00
Brad Fitzpatrick
1fa0206024 net/http: fix data race in benchmark
Fixes #7006

R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/44940044
2013-12-26 12:16:11 -08:00
John Newlin
92b5e16147 net/http: Release reference to chunkWriter's bufio.Writer on hijack
When a connection is hijacked, release the reference to the bufio.Writer
that is used with the chunkWriter.  The chunkWriter is not used after
the connection is hijacked.

Also add a test to check that double Hijack calls do something sensible.

benchmark                old ns/op    new ns/op    delta
BenchmarkServerHijack        24137        20629  -14.53%

benchmark               old allocs   new allocs    delta
BenchmarkServerHijack           21           19   -9.52%

benchmark                old bytes    new bytes    delta
BenchmarkServerHijack        11774         9667  -17.90%

R=bradfitz, dave, chris.cahoon
CC=golang-codereviews
https://golang.org/cl/39440044
2013-12-26 11:52:14 -08:00
Brad Fitzpatrick
499d2167fc C: add John Newlin (Google CLA)
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/45830043
2013-12-26 11:52:04 -08:00
Marko Tiikkaja
0d12e24ebb database/sql: Use all connections in pool
The last connection in the pool was not being handed out correctly.

R=golang-codereviews, gobot, bradfitz
CC=golang-codereviews
https://golang.org/cl/40410043
2013-12-26 11:27:18 -08:00
Ian Lance Taylor
59583b09f3 runtime/cgo: include <signal.h> to fix build
R=golang-codereviews
TBR=dfc
CC=golang-codereviews
https://golang.org/cl/43120044
2013-12-24 08:24:32 -08:00
Ian Lance Taylor
699dbb60b7 runtime/cgo: always set signal mask before calling pthread_create
This was done correctly for most targets but was missing from
FreeBSD/ARM and Linux/ARM.

R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/45180043
2013-12-24 08:08:15 -08:00
Yasuhiro Matsumoto
7413e48d5b misc/vim: Fix broken quote
R=golang-codereviews, gobot, dsymonds
CC=golang-codereviews
https://golang.org/cl/44960043
2013-12-24 08:40:13 +11:00
S.Çağlar Onur
41183d015d cgo/runtime: replace sigprocmask with pthread_sigmask.
sigprocmask use in a multithreaded environment is undefined so replace it with pthread_sigmask.

Fixes #6811.

R=jsing, iant
CC=golang-codereviews, golang-dev
https://golang.org/cl/30460043
2013-12-22 08:55:29 -08:00
Ian Lance Taylor
da9e39db86 A+C: S.Çağlar Onur (individual CLA)
Generated by addca.

R=gobot
CC=golang-codereviews
https://golang.org/cl/42800045
2013-12-22 08:50:56 -08:00
Shawn Smith
7054890715 bytes, strings: improve Title test coverage by adding cases with underscore and unicode line separator
R=golang-codereviews, gobot, r
CC=golang-codereviews
https://golang.org/cl/42310045
2013-12-20 23:19:32 -08:00
Alex Brainman
e8b7def7f4 doc/go1.3.txt: mention windows syscall.NewCallbackCDecl
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/44160044
2013-12-21 12:52:53 +11:00
David du Colombier
4237ffe5ea os: reimplement HasPrefix and LastIndex to not depend on strings
R=golang-codereviews, rsc
CC=golang-codereviews, jas
https://golang.org/cl/44790043
2013-12-21 01:22:10 +01:00