]>
Cypherpunks repositories - gostls13.git/log
Joel Sing [Thu, 17 Nov 2011 12:13:49 +0000 (23:13 +1100)]
syscall: implement nametomib for openbsd.
Move the existing darwin/freebsd specific nametomib implementation
into the respective operating system dependent files.
Provide a nametomib implementation for openbsd, which operates on a
sysctl MIB that has been pre-generated from the various system headers
by mksysctl_openbsd.pl.
R=rsc
CC=golang-dev
https://golang.org/cl/
4935044
Andrew Balholm [Thu, 17 Nov 2011 02:12:13 +0000 (13:12 +1100)]
html: parse <isindex>
Pass tests2.dat, test 42:
<isindex test=x name=x>
| <html>
| <head>
| <body>
| <form>
| <hr>
| <label>
| "This is a searchable index. Enter search keywords: "
| <input>
| name="isindex"
| test="x"
| <hr>
R=nigeltao
CC=golang-dev
https://golang.org/cl/
5399049
Andrew Gerrand [Thu, 17 Nov 2011 00:42:25 +0000 (11:42 +1100)]
http: fix serving from CWD with http.ServeFile
http: make Dir("") equivalent to Dir(".")
Fixes #2471.
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/
5370061
Alex Brainman [Thu, 17 Nov 2011 00:20:42 +0000 (11:20 +1100)]
exp/ssh: change test listen address, also exit test if fails
R=golang-dev, rsc
CC=dave, golang-dev
https://golang.org/cl/
5364061
Russ Cox [Thu, 17 Nov 2011 00:18:25 +0000 (19:18 -0500)]
reflect: make Value an opaque struct
Making Value opaque means we can drop the interface kludges
in favor of a significantly simpler and faster representation.
v.Kind() will be a prime candidate for inlining too.
On a Thinkpad X201s using -benchtime 10:
benchmark old ns/op new ns/op delta
json.BenchmarkCodeEncoder
284391780 157415960 -44.65%
json.BenchmarkCodeMarshal
286979140 158992020 -44.60%
json.BenchmarkCodeDecoder
717175800 388288220 -45.86%
json.BenchmarkCodeUnmarshal
734470500 404548520 -44.92%
json.BenchmarkCodeUnmarshalReuse
707172280 385258720 -45.52%
json.BenchmarkSkipValue
24630036 18557062 -24.66%
benchmark old MB/s new MB/s speedup
json.BenchmarkCodeEncoder 6.82 12.33 1.81x
json.BenchmarkCodeMarshal 6.76 12.20 1.80x
json.BenchmarkCodeDecoder 2.71 5.00 1.85x
json.BenchmarkCodeUnmarshal 2.64 4.80 1.82x
json.BenchmarkCodeUnmarshalReuse 2.74 5.04 1.84x
json.BenchmarkSkipValue 77.92 103.42 1.33x
I cannot explain why BenchmarkSkipValue gets faster.
Maybe it is one of those code alignment things.
R=iant, r, gri, r
CC=golang-dev
https://golang.org/cl/
5373101
Russ Cox [Wed, 16 Nov 2011 23:44:21 +0000 (18:44 -0500)]
gofmt: do not stop test.sh after 1 error
Fix bug377.go to be gofmt-compliant.
R=gri, r, r
CC=golang-dev
https://golang.org/cl/
5400045
Andrew Balholm [Wed, 16 Nov 2011 23:25:33 +0000 (10:25 +1100)]
html: parse </optgroup> and </option>
Pass tests2.dat, test 35:
<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| <optgroup>
| <option>
| <option>
| <option>
Also pass tests through test 41:
<!DOCTYPE html><!-- XXX - XXX - XXX -->
R=nigeltao, rsc
CC=golang-dev
https://golang.org/cl/
5395045
Russ Cox [Wed, 16 Nov 2011 23:13:50 +0000 (18:13 -0500)]
exp/ssh: fix test?
Fixes use of c after Dial failure (causes crash).
May fix Dial failure by listening to 127.0.0.1:0
instead of 0.0.0.0:0 (tests should only listen on
localhost).
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/
5395052
Russ Cox [Wed, 16 Nov 2011 22:55:35 +0000 (17:55 -0500)]
go/printer: make //line formatting idempotent
Fixes "test.sh" (long test) in src/cmd/gofmt.
R=gri
CC=golang-dev
https://golang.org/cl/
5307081
Lucio De Re [Wed, 16 Nov 2011 22:37:54 +0000 (17:37 -0500)]
syscall, os, time: fix Plan 9 build
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/
5371092
Christopher Wedgwood [Wed, 16 Nov 2011 22:34:18 +0000 (17:34 -0500)]
exp/ssh: add to pkg Makefile
R=rsc, dave
CC=golang-dev
https://golang.org/cl/
5399045
Anthony Martin [Wed, 16 Nov 2011 21:58:02 +0000 (16:58 -0500)]
gc: support for building with Plan 9 yacc
I've modified Plan 9's yacc to work with
the grammar in go.y. These are the only
changes necessary on the Go side.
R=rsc
CC=golang-dev
https://golang.org/cl/
5375104
Robert Griesemer [Wed, 16 Nov 2011 21:41:26 +0000 (13:41 -0800)]
go/ast: remove unused receiver names (cleanup)
R=iant, iant
CC=golang-dev
https://golang.org/cl/
5393047
Lucio De Re [Wed, 16 Nov 2011 21:23:50 +0000 (16:23 -0500)]
cov: fix for Plan 9 build
R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/
5374086
Gustavo Niemeyer [Wed, 16 Nov 2011 19:35:47 +0000 (17:35 -0200)]
net/http: fix EOF handling on response body
http.Response is currently returning 0, nil on EOF.
R=golang-dev, bradfitz, bradfitz
CC=golang-dev
https://golang.org/cl/
5394047
Brad Fitzpatrick [Wed, 16 Nov 2011 18:11:39 +0000 (10:11 -0800)]
fcgi: fix server capability discovery
The wrong length was being sent, and two parameters
were also transposed. Made the record type be a type
and made the constants typed, to prevent that sort
of bug in the future.
Fixes #2469
R=golang-dev, edsrzf
CC=golang-dev
https://golang.org/cl/
5394046
Rob Pike [Wed, 16 Nov 2011 17:32:52 +0000 (09:32 -0800)]
html/template: indirect top-level values before printing
text/template does this (in an entirely different way), so
make html/template do the same. Before this fix, the template
{{.}} given a pointer to a string prints its address instead of its
value.
R=mikesamuel, r
CC=golang-dev
https://golang.org/cl/
5370098
Dave Cheney [Wed, 16 Nov 2011 15:19:56 +0000 (10:19 -0500)]
exp/ssh: fix unmarshal test
Ensure that empty NameLists always return
a zero length []string, not nil.
In practice NameLists are only used in a few
message types and always consumed by a for
range function so the difference between nil
and []string{} is not significant.
Also, add exp/ssh to pkg/Makefile as suggested
by rsc.
R=rsc, agl
CC=golang-dev
https://golang.org/cl/
5400042
Andrew Balholm [Wed, 16 Nov 2011 08:25:55 +0000 (19:25 +1100)]
html: parse <optgroup> tags
Pass tests2.dat, test 34:
<!DOCTYPE html><select><option><optgroup>
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| <option>
| <optgroup>
R=nigeltao
CC=golang-dev
https://golang.org/cl/
5393045
Andrew Balholm [Wed, 16 Nov 2011 01:18:11 +0000 (12:18 +1100)]
html: parse <caption> elements
Pass tests2.dat, test 33:
<!DOCTYPE html><table><caption>test TEST</caption><td>test
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <table>
| <caption>
| "test TEST"
| <tbody>
| <tr>
| <td>
| "test"
R=nigeltao
CC=golang-dev
https://golang.org/cl/
5371099
Yasuhiro Matsumoto [Wed, 16 Nov 2011 00:29:43 +0000 (16:29 -0800)]
exp/sql: NumInput() allow -1 to ignore checking.
Some database driver can't get number of parameters.
For example:
http://support.microsoft.com/kb/240205/en-us
So, added way to ignore checking number of parameters with return -1.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
5376091
Brad Fitzpatrick [Tue, 15 Nov 2011 22:29:45 +0000 (14:29 -0800)]
sql: document that for drivers, io.EOF means no more rows
This was used in the sql package + tests, but never
documented.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/
5372107
Mikio Hara [Tue, 15 Nov 2011 21:59:08 +0000 (06:59 +0900)]
net, syscall: add missing copyright notices
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5375099
Russ Cox [Tue, 15 Nov 2011 19:54:00 +0000 (14:54 -0500)]
os: fix comment per CL
5370091
Made the edit in the wrong client before submitting.
TBR=r
CC=golang-dev
https://golang.org/cl/
5374091
Russ Cox [Tue, 15 Nov 2011 19:05:18 +0000 (14:05 -0500)]
os: fix windows build
TBR=brainman
CC=golang-dev
https://golang.org/cl/
5373105
Russ Cox [Tue, 15 Nov 2011 18:59:59 +0000 (13:59 -0500)]
encoding/json: make BenchmarkSkipValue more consistent
Move scanner allocation out of loop.
It's the only allocation in the test so it dominates
when it triggers a garbage collection.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
5369117
Bobby Powers [Tue, 15 Nov 2011 18:22:34 +0000 (10:22 -0800)]
misc/emacs: add delete builtin
R=golang-dev, mpimenov, gri
CC=golang-dev
https://golang.org/cl/
5370101
Russ Cox [Tue, 15 Nov 2011 18:09:19 +0000 (13:09 -0500)]
testing: print test results to standard output
Errors in the code under test go to standard output.
Errors in testing or its usage go to standard error.
R=r
CC=golang-dev
https://golang.org/cl/
5374090
Russ Cox [Tue, 15 Nov 2011 17:49:22 +0000 (12:49 -0500)]
misc/benchcmp: benchmark comparison script
I've been using this since April and posted it on the
mailing list, but it seems worth having in the repository.
Not sure about the location.
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/
5371100
Alex Brainman [Tue, 15 Nov 2011 17:48:22 +0000 (12:48 -0500)]
syscall: make windows build again after
d3963c0fca78 change
R=rsc, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/
5373097
Russ Cox [Tue, 15 Nov 2011 17:20:59 +0000 (12:20 -0500)]
allow copy of struct containing unexported fields
An experiment: allow structs to be copied even if they
contain unexported fields. This gives packages the
ability to return opaque values in their APIs, like reflect
does for reflect.Value but without the kludgy hacks reflect
resorts to.
In general, we trust programmers not to do silly things
like *x = *y on a package's struct pointers, just as we trust
programmers not to do unicode.Letter = unicode.Digit,
but packages that want a harder guarantee can introduce
an extra level of indirection, like in the changes to os.File
in this CL or by using an interface type.
All in one CL so that it can be rolled back more easily if
we decide this is a bad idea.
Originally discussed in March 2011.
https://groups.google.com/group/golang-dev/t/
3f5d30938c7c45ef
R=golang-dev, adg, dvyukov, r, bradfitz, jan.mercl, gri
CC=golang-dev
https://golang.org/cl/
5372095
Russ Cox [Tue, 15 Nov 2011 17:17:25 +0000 (12:17 -0500)]
strconv: make Ftoa faster
Make code amenable to escape analysis
so that the decimal values do not escape.
benchmark old ns/op new ns/op delta
strconv_test.BenchmarkAtof64Decimal 229 233 +1.75%
strconv_test.BenchmarkAtof64Float 261 263 +0.77%
strconv_test.BenchmarkAtof64FloatExp 7760 7757 -0.04%
strconv_test.BenchmarkAtof64Big 3086 3053 -1.07%
strconv_test.BenchmarkFtoa64Decimal 6866 2629 -61.71%
strconv_test.BenchmarkFtoa64Float 7211 3064 -57.51%
strconv_test.BenchmarkFtoa64FloatExp 12587 8263 -34.35%
strconv_test.BenchmarkFtoa64Big 7058 2825 -59.97%
json.BenchmarkCodeEncoder
357355200 276528200 -22.62%
json.BenchmarkCodeMarshal
360735200 279646400 -22.48%
json.BenchmarkCodeDecoder
731528600 709460600 -3.02%
json.BenchmarkCodeUnmarshal
754774400 731051200 -3.14%
json.BenchmarkCodeUnmarshalReuse
713379000 704218000 -1.28%
json.BenchmarkSkipValue
51594300 51682600 +0.17%
benchmark old MB/s new MB/s speedup
json.BenchmarkCodeEncoder 5.43 7.02 1.29x
json.BenchmarkCodeMarshal 5.38 6.94 1.29x
json.BenchmarkCodeDecoder 2.65 2.74 1.03x
json.BenchmarkCodeUnmarshal 2.57 2.65 1.03x
json.BenchmarkCodeUnmarshalReuse 2.72 2.76 1.01x
json.BenchmarkSkipValue 38.61 38.55 1.00x
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
5369111
Russ Cox [Tue, 15 Nov 2011 17:05:25 +0000 (12:05 -0500)]
runtime: avoid allocation for make([]T, 0)
R=gri, iant, iant
CC=golang-dev
https://golang.org/cl/
5375093
Russ Cox [Tue, 15 Nov 2011 16:02:04 +0000 (11:02 -0500)]
strconv: add Ftoa benchmarks
R=bradfitz
CC=golang-dev
https://golang.org/cl/
5373096
Russ Cox [Tue, 15 Nov 2011 15:58:19 +0000 (10:58 -0500)]
encoding/json: add marshal/unmarshal benchmark
R=bradfitz
CC=golang-dev
https://golang.org/cl/
5387041
Mikio Hara [Tue, 15 Nov 2011 05:04:58 +0000 (14:04 +0900)]
net/http: fix build
empty is already not a nil.
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/
5376099
Andrew Balholm [Tue, 15 Nov 2011 04:31:22 +0000 (15:31 +1100)]
html: auto-close <p> elements when starting <form> element.
Pass tests2.dat, test 26:
<!doctypehtml><p><form>
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <p>
| <form>
Also pass tests through test 32:
<!DOCTYPE html><!-- X
R=nigeltao
CC=golang-dev
https://golang.org/cl/
5369114
Mikio Hara [Tue, 15 Nov 2011 01:28:01 +0000 (10:28 +0900)]
xml: fix build
empty is already not a nil.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
5376098
Mikio Hara [Tue, 15 Nov 2011 01:27:43 +0000 (10:27 +0900)]
go/build: fix build
empty is already not a nil.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
5375097
Andrew Balholm [Tue, 15 Nov 2011 00:39:18 +0000 (11:39 +1100)]
html: parse and render <plaintext> elements
Pass tests2.dat, test 10:
<table><plaintext><td>
| <html>
| <head>
| <body>
| <plaintext>
| "<td>"
| <table>
Also pass tests through test 25:
<!doctypehtml><p><dd>
R=nigeltao
CC=golang-dev
https://golang.org/cl/
5369109
Robert Griesemer [Mon, 14 Nov 2011 21:35:22 +0000 (13:35 -0800)]
math/big: replace nat{} -> nat(nil)
No need for creating a new nat each time.
Per Roger Peppe's suggestion; assuming
nat(nil) produces better code than nat{}.
R=rsc
CC=golang-dev
https://golang.org/cl/
5375092
Brad Fitzpatrick [Mon, 14 Nov 2011 21:12:08 +0000 (13:12 -0800)]
cgi: make test code more readable
R=rsc
CC=golang-dev
https://golang.org/cl/
5375089
Russ Cox [Mon, 14 Nov 2011 21:11:15 +0000 (16:11 -0500)]
reflect: empty slice/map is not DeepEqual to nil
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
5373095
Russ Cox [Mon, 14 Nov 2011 21:10:58 +0000 (16:10 -0500)]
fmt: distinguish empty vs nil slice/map in %#v
Also update Scanf tests to cope with DeepEqual
distinguishing empty vs nil slice.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
5375091
Russ Cox [Mon, 14 Nov 2011 21:03:23 +0000 (16:03 -0500)]
encoding/json: decode [] as empty slice, not nil slice
Test was already present, but bug in reflect.DeepEqual hid this bug.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
5375090
Lucio De Re [Mon, 14 Nov 2011 20:59:27 +0000 (15:59 -0500)]
6l, 8l: add missing space in error message
R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/
5374085
Russ Cox [Mon, 14 Nov 2011 20:21:08 +0000 (15:21 -0500)]
crypto/tls: fix handshake message test
This test breaks when I make reflect.DeepEqual
distinguish empty slices from nil slices.
R=agl
CC=golang-dev
https://golang.org/cl/
5369110
Dmitriy Vyukov [Mon, 14 Nov 2011 19:31:39 +0000 (22:31 +0300)]
time: fix test hang
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
5374083
Anthony Starks [Mon, 14 Nov 2011 19:19:08 +0000 (11:19 -0800)]
misc/notepadplus: error and rune support
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/
5376048
Anthony Starks [Mon, 14 Nov 2011 19:18:00 +0000 (11:18 -0800)]
misc/bbedit: error and rune support
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/
5369057
Evan Shaw [Mon, 14 Nov 2011 19:16:06 +0000 (11:16 -0800)]
kate: add error and rune
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/
5370078
Russ Cox [Mon, 14 Nov 2011 19:06:50 +0000 (14:06 -0500)]
syscall: take over env implementation
The environment is needed by package time, which
we want not to depend on os (so that os can use
time.Time), so push down into syscall.
Delete syscall.Sleep, now unnecessary.
The package os environment API is preserved;
it is only the implementation that is moving to syscall.
Delete os.Envs, which was undocumented,
uninitialized on Windows and Plan 9, and
not maintained by Setenv and Clearenv.
Code can call os.Environ instead.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
5370091
Dmitriy Vyukov [Mon, 14 Nov 2011 18:59:48 +0000 (21:59 +0300)]
runtime: fix timers crash
Timer callbacks occasionally crash
with "sched while holding locks" message.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5381043
Brad Fitzpatrick [Mon, 14 Nov 2011 18:48:26 +0000 (10:48 -0800)]
sql: add DB.Close, fix bugs, remove Execer on Driver (only Conn)
R=rsc
CC=golang-dev
https://golang.org/cl/
5372099
Russ Cox [Mon, 14 Nov 2011 16:31:58 +0000 (11:31 -0500)]
syscall: more linux arm build fixes
Don't know if it runs, but at least it builds.
R=bradfitz
TBR=bradfitz
CC=golang-dev
https://golang.org/cl/
5373093
Joel Sing [Mon, 14 Nov 2011 15:52:36 +0000 (07:52 -0800)]
doc/install: add openbsd
Add openbsd to the $GOOS list.
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/
4964053
Alex Brainman [Mon, 14 Nov 2011 09:54:47 +0000 (20:54 +1100)]
runtime: fix syscall test to satisfy new error
R=rsc
CC=golang-dev
https://golang.org/cl/
5369103
Alex Brainman [Mon, 14 Nov 2011 09:53:03 +0000 (20:53 +1100)]
doc/progs: fix windows version to satisfy new error
R=rsc
CC=golang-dev
https://golang.org/cl/
5376089
Luuk van Dijk [Mon, 14 Nov 2011 09:08:04 +0000 (10:08 +0100)]
gc: fix newlines in %+N
fixes #2442
R=rsc
CC=golang-dev
https://golang.org/cl/
5370066
Russ Cox [Mon, 14 Nov 2011 06:23:27 +0000 (01:23 -0500)]
syscall: fix linux arm build
Regenerate system call file.
TBR=bradfitz
CC=golang-dev
https://golang.org/cl/
5371087
Russ Cox [Mon, 14 Nov 2011 06:21:38 +0000 (01:21 -0500)]
syscall: make windows Errno implement net.Error (fix build)
TBR=brainman
CC=golang-dev
https://golang.org/cl/
5371086
Mikio Hara [Mon, 14 Nov 2011 04:27:40 +0000 (13:27 +0900)]
syscall: regenerate z-files for freebsd
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5369102
Russ Cox [Mon, 14 Nov 2011 03:58:08 +0000 (22:58 -0500)]
gc: remove func, map compare
R=ken, ken
CC=golang-dev
https://golang.org/cl/
5373079
Russ Cox [Mon, 14 Nov 2011 03:57:45 +0000 (22:57 -0500)]
spec: disallow general func, map comparisons
R=golang-dev, gri, r, r
CC=golang-dev
https://golang.org/cl/
5369090
Russ Cox [Mon, 14 Nov 2011 03:57:19 +0000 (22:57 -0500)]
various: avoid func compare
R=gri, r, bradfitz
CC=golang-dev
https://golang.org/cl/
5371074
Russ Cox [Mon, 14 Nov 2011 03:44:52 +0000 (22:44 -0500)]
syscall: use error
- syscall (not os) now defines the Errno type.
- the low-level assembly functions Syscall, Syscall6, and so on
return Errno, not uintptr
- syscall wrappers all return error, not uintptr.
R=golang-dev, mikioh.mikioh, r, alex.brainman
CC=golang-dev
https://golang.org/cl/
5372080
Russ Cox [Mon, 14 Nov 2011 03:42:57 +0000 (22:42 -0500)]
time: remove unused sysSleep
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/
5369094
Russ Cox [Mon, 14 Nov 2011 03:42:42 +0000 (22:42 -0500)]
various: reduce overuse of os.EINVAL + others
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
5372081
Dave Cheney [Mon, 14 Nov 2011 02:05:35 +0000 (21:05 -0500)]
exp/ssh: add direct-tcpip client support
This CL adds experimental support for making proxied
net.Conn connections via the remote server.
nb. Functional tests exist for this feature but CL
5320053 or similar needs to be committed to support them.
R=rsc, agl, n13m3y3r
CC=cw, golang-dev, huin
https://golang.org/cl/
5371081
Dave Cheney [Mon, 14 Nov 2011 01:58:51 +0000 (20:58 -0500)]
exp/ssh: add client functional tests
Requires CL
5373055
R=rsc, agl, n13m3y3r
CC=golang-dev
https://golang.org/cl/
5320053
Dave Cheney [Mon, 14 Nov 2011 01:57:15 +0000 (20:57 -0500)]
exp/ssh: use ClientConfig.rand() for publickey authentication
Closes TODO from
5373055
R=agl
CC=golang-dev
https://golang.org/cl/
5375081
Dave Cheney [Sun, 13 Nov 2011 19:48:22 +0000 (14:48 -0500)]
exp/ssh: add client side support for publickey auth
client.go/client_auth.go:
* add support for publickey key auth using the interface
outlined by rsc in the previous auth CL
client_auth_test.go:
* password and publickey tests against server.go
common.go/server.go:
* move some helper methods from server.go into common.go
* generalise serializeRSASignature
R=rsc, agl, huin
CC=cw, golang-dev, n13m3y3r
https://golang.org/cl/
5373055
Dave Cheney [Sun, 13 Nov 2011 17:13:46 +0000 (12:13 -0500)]
exp/ssh: ensure initial window advertisement is not lost
Some remote servers send a 0 window size in the channel
open confirm msg, others send a non zero window size. Make
sure this initial advertisement is not lost.
R=agl, rsc, cw
CC=golang-dev
https://golang.org/cl/
5372083
Andrew Balholm [Sun, 13 Nov 2011 12:27:20 +0000 (23:27 +1100)]
html: auto-close <dd> and <dt> elements
Pass tests2.dat, test 8:
<!DOCTYPE html><dt><div><dd>
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <dt>
| <div>
| <dd>
Also pass tests through test 9:
<script></x
R=nigeltao
CC=golang-dev
https://golang.org/cl/
5373083
Andrew Balholm [Sun, 13 Nov 2011 01:39:41 +0000 (12:39 +1100)]
html: store the current insertion mode in the parser
Currently, the state transition functions in the HTML parser
return the next insertion mode and whether the token is consumed.
This works well except for when one insertion mode needs to use
the rules for another insertion mode. Then the useTheRulesFor
function needs to patch things up. This requires comparing functions
for equality, which is going to stop working.
Adding a field to the parser structure to store the current
insertion mode eliminates the need for useTheRulesFor;
one insertion mode function can now just call the other
directly. The insertion mode will be changed only if it needs to be.
This CL is an alternative to CL
5372078 .
R=nigeltao, rsc
CC=golang-dev
https://golang.org/cl/
5372079
Joel Sing [Sat, 12 Nov 2011 16:58:24 +0000 (03:58 +1100)]
runtime: remove no longer used enums for openbsd
The code that used these has been moved to lock_sema.c.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5376062
Luuk van Dijk [Sat, 12 Nov 2011 05:32:56 +0000 (00:32 -0500)]
gc: look at cumulative error count, not just per-function.
Not sure if this is what you'd really want. Maybe with a higher limit than 10
or perhaps keep checking nerrors > 10 per yyerror, but check the cumulative
after each function?
R=rsc
CC=golang-dev
https://golang.org/cl/
5376064
Robert Griesemer [Sat, 12 Nov 2011 01:30:52 +0000 (17:30 -0800)]
godoc: document -templates flag
Fixes #2441.
R=r
CC=golang-dev
https://golang.org/cl/
5376078
Andrew Balholm [Sat, 12 Nov 2011 01:23:30 +0000 (12:23 +1100)]
html: handle end tags in strange places
Pass tests1.dat, test 111:
</strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>
| <html>
| <head>
| <body>
| <br>
| <p>
Also pass all the remaining tests in tests1.dat.
R=nigeltao
CC=golang-dev
https://golang.org/cl/
5372066
Robert Griesemer [Sat, 12 Nov 2011 00:59:47 +0000 (16:59 -0800)]
godoc: fix remote search (use correct URL)
Also works now together with -html, as in:
godoc -html -q Sin
for an html result.
Fixes #2435.
R=iant
CC=golang-dev
https://golang.org/cl/
5375074
Ian Lance Taylor [Fri, 11 Nov 2011 22:30:27 +0000 (14:30 -0800)]
runtime: remove declarations of nonexistent functions
R=rsc, r
CC=golang-dev
https://golang.org/cl/
5369089
Rémy Oudompheng [Fri, 11 Nov 2011 22:11:30 +0000 (14:11 -0800)]
gofmt: leave nil nodes of the AST unchanged.
Without this check, gofmt panics when trying to apply
the identity transformation on "item.field" expressions.
Fixes #2410.
R=rsc, gri
CC=golang-dev, remy
https://golang.org/cl/
5376061
Russ Cox [Fri, 11 Nov 2011 21:48:25 +0000 (16:48 -0500)]
gc: remove m[k] = x, false
R=ken2
CC=golang-dev
https://golang.org/cl/
5376076
Bobby Powers [Fri, 11 Nov 2011 21:41:37 +0000 (16:41 -0500)]
build: fix check for selinux's allow_execstack on Fedora 16
Fedora 16 mounts selinux at /sys/fs/selinux, instead of the
traditional /selinux. Check both locations for the selinux
filesystem in make.bash
Fixes #2448.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5373077
Russ Cox [Fri, 11 Nov 2011 19:56:49 +0000 (14:56 -0500)]
6a, 8a: allow $(-1) for consistency with $1, $(1), $-1.
R=ken2
CC=golang-dev
https://golang.org/cl/
5373074
Scott Lawrence [Fri, 11 Nov 2011 19:56:18 +0000 (14:56 -0500)]
env.bash: Check for presence of make/gmake
Without this, a missing gmake will result in bogus error "Did not find
Go environment variables".
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5369066
Anthony Martin [Fri, 11 Nov 2011 19:40:41 +0000 (14:40 -0500)]
net, io/ioutil: remove use of os.Time
I had to replace the single use of io/ioutil
in the time package with a bytes.Buffer since
there would've been a dependency cycle.
There are no other uses of os.Time.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5372054
Wei Guangjing [Fri, 11 Nov 2011 19:40:24 +0000 (14:40 -0500)]
ld: fix .bss for ldpe.
Fixes #2409.
R=mattn.jp, rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/
5334046
Adam Langley [Fri, 11 Nov 2011 19:04:33 +0000 (14:04 -0500)]
exp/terminal: rename shell to terminal and add SetSize
It was never really a shell, but the name carried
over from SSH's ServerShell.
Two small functional changes:
Add SetSize, which allows the size of the terminal
to be changed in response, say, to an SSH message.
Don't write the prompt if there's already something
on the current line.
R=rsc
CC=golang-dev
https://golang.org/cl/
5376066
Joel Sing [Fri, 11 Nov 2011 18:19:09 +0000 (05:19 +1100)]
syscall: fix zerrors for openbsd 386
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/
5369076
Adam Langley [Fri, 11 Nov 2011 16:18:45 +0000 (11:18 -0500)]
exp/terminal: rename terminal.go to util.go
(This is part of removing the duplicate code between exp/terminal and
exp/ssh, but hg is having a very hard time keeping up so I'm doing it
in small steps.)
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/
5373061
Mikio Hara [Fri, 11 Nov 2011 15:22:22 +0000 (00:22 +0900)]
syscall: regenerate z-files for freebsd, openbsd
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5375057
Andrew Balholm [Fri, 11 Nov 2011 10:44:01 +0000 (21:44 +1100)]
html: ignore <col> tag outside tables
Pass tests1.dat, test 109:
<table><col><tbody><col><tr><col><td><col></table><col>
| <html>
| <head>
| <body>
| <table>
| <colgroup>
| <col>
| <tbody>
| <colgroup>
| <col>
| <tbody>
| <tr>
| <colgroup>
| <col>
| <tbody>
| <tr>
| <td>
| <colgroup>
| <col>
Also pass test 110:
<table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup>
R=nigeltao
CC=golang-dev
https://golang.org/cl/
5369069
Andrew Balholm [Fri, 11 Nov 2011 00:41:46 +0000 (11:41 +1100)]
html: parse column groups
Pass tests1.dat, test 108:
<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table>
| <html>
| <head>
| <body>
| <table>
| <colgroup>
| <col>
| <colgroup>
| <col>
| <col>
| <col>
| <colgroup>
| <col>
| <col>
| <thead>
| <tr>
| <td>
R=nigeltao
CC=golang-dev
https://golang.org/cl/
5369061
Russ Cox [Fri, 11 Nov 2011 00:08:28 +0000 (19:08 -0500)]
runtime, syscall: convert from godefs to cgo
R=golang-dev, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/
5348052
Russ Cox [Fri, 11 Nov 2011 00:08:04 +0000 (19:08 -0500)]
godefs: delete, replaced by cgo -godefs
Godefs was a C program that ran gcc and then parsed the
stabs debugging information in the resulting object file to
generate C or Go code for bootstrapping as part of
package runtime or package syscall.
Cgo does the same work, but using the dwarf debugging
information. Add -godefs and -cdefs options to cgo that
mimic godefs's output, albeit with different input
(a Go program, not a C program).
This has been a "nice to have" for a while but was forced
by Apple removing stabs debugging output from their
latest compilers.
Fixes #835.
Fixes #2338.
R=golang-dev, bradfitz, r, dave, iant
CC=golang-dev
https://golang.org/cl/
5367043
Rob Pike [Thu, 10 Nov 2011 22:02:14 +0000 (14:02 -0800)]
tutorial: describe unidirectional channels
R=golang-dev, adg, gri
CC=golang-dev
https://golang.org/cl/
5370058
Volker Dobler [Thu, 10 Nov 2011 20:40:50 +0000 (12:40 -0800)]
time: add ISOWeek method to Time
As the ISO 8601 week number is untrivial to compute a new method
on *Time provides year and number of week.
R=golang-dev, rsc, r, r
CC=golang-dev
https://golang.org/cl/
5316074
Rob Pike [Thu, 10 Nov 2011 19:59:50 +0000 (11:59 -0800)]
testing: add file:line stamps to messages.
A single-line error looks like this:
--- FAIL: foo_test.TestFoo (0.00 seconds)
foo_test.go:123: Foo(8) = "10" want "100"
A multi-line error looks like this:
--- FAIL: foo_test.TestFoo (0.00 seconds)
foo_test.go:456: Foo(88) = "100"
want "1000"
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/
5376057
Joel Sing [Thu, 10 Nov 2011 19:42:01 +0000 (11:42 -0800)]
runtime: fix semasleep() duration for openbsd
The timespec passed to thrsleep() needs to be an absolute/realtime
value, so add the current nanotime to ns.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5374048