net: treat android like linux in tests

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/112810043
net: no AI_ALL on android

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/112800043
crypto/x509: skip test on android (no Go tool)

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://codereview.appspot.com/111970043
cmd/objdump: skip test on android (no Go tool)

LGTM=minux, iant
R=golang-codereviews, minux, iant
CC=golang-codereviews
https://codereview.appspot.com/109570043
os: adjust tests for android file system

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/108460043
cmd/nm: skip test on android (no Go tool)

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/107590043
cmd/pack: skip test on android (no Go tool)

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://codereview.appspot.com/107600043
cmd/addr2line: skip test on android

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://codereview.appspot.com/104600043
runtime: fix spurious "[string too long]" error
Maxstring is not updated in the new string routines,
this makes runtime think that long strings are bogus.
Fixes issue 8339.

LGTM=crawshaw, iant
R=golang-codereviews, crawshaw, iant
CC=golang-codereviews, khr, rsc
https://codereview.appspot.com/110930043
runtime: skip crash test on android

LGTM=bradfitz
R=golang-codereviews, bradfitz, minux
CC=golang-codereviews
https://codereview.appspot.com/110400043
go/build: add android to the flock

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://codereview.appspot.com/108450044
test: add test for gccgo comment lexing failure

http://gcc.gnu.org/PR61746

http://code.google.com/p/gofrontend/issues/detail?id=35

LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews
https://codereview.appspot.com/111980043
run.bash: disable tests that don't (yet) like running off the host

LGTM=bradfitz, minux
R=bradfitz, golang-codereviews, minux
CC=golang-codereviews
https://codereview.appspot.com/110940043
cmd/go: fix build -o panic when import path pattern matches 0 pkgs

Fixes issue 8165.

After this change, the panic is replaced by a message:

        $ go build -o out ...doesntexist
        warning: "...doesntexist" matched no packages
        no packages to build

The motivation to return 1 exit error code is to allow -o flag
to be used to guarantee that the output binary is written to
when exit status is 0. If someone uses an import path pattern
to specify a single package and suddenly that matches no packages,
it's better to return exit code 1 instead of silently doing nothing.
This is consistent with the case when -o flag is given and multiple
packages are matched.
It's also somewhat consistent with the current behavior with the
panic, except that gave return code 2. But it's similar in
that it's also non-zero (indicating failure).
I've changed the language to be similar to output of go test
when an import path pattern matches no packages (it also has a return status of
1):

        $ go test ...doesntexist
        warning: "...doesntexist" matched no packages
        no packages to test

LGTM=adg
R=golang-codereviews, josharian, gobot, adg
CC=golang-codereviews
https://codereview.appspot.com/107140043

Committer: Andrew Gerrand <adg@golang.org>
syscall: NetlinkRIB, avoid allocation in loop

NetlinkRIB is currently allocating a page sized slice of bytes in a
for loop and it's also calling Getpagesize() in the same for loop.

This CL changes NetlinkRIB to preallocate the page sized slice of
bytes before reaching the for loop. This reduces memory allocations
and lowers the number of calls to Getpagesize() to 1 per NetlinkRIB
call.

This CL reduces the allocated memory from 141.5 MB down to 52 MB in
a test.

LGTM=crawshaw, dave
R=dave, dsymonds, crawshaw
CC=bradfitz, dsymonds, golang-codereviews
https://codereview.appspot.com/110920043

Committer: Dave Cheney <dave@cheney.net>
os: fix failing test on Plan 9

LGTM=0intro, r
R=0intro, r
CC=ality, dave, golang-codereviews, jas, mischief, rsc
https://codereview.appspot.com/105580044
syscall: remove more NxM assumptions on Plan 9

LGTM=0intro, r
R=0intro, r
CC=ality, dave, golang-codereviews, jas, mischief, rsc
https://codereview.appspot.com/111910043
cmd/objdump: set goarch properly on non-386 Plan 9 systems

LGTM=0intro, r
R=0intro, r
CC=ality, golang-codereviews, jas, mischief
https://codereview.appspot.com/108420043
debug/plan9obj, cmd/addr2line: on Plan 9 use a.out header
size instead of abusing text symbol

cmd/addr2line needs to know the virtual address of the start
of the text segment (load address plus header size). For
this, it used the text symbol added by the linker. This is
wrong on amd64. Header size is 40 bytes, not 32 like on 386
and arm. Function alignment is 16 bytes causing text to be
at 0x200030.

debug/plan9obj now exports both the load address and the
header size; cmd/addr2line uses this new information and
doesn't rely on text anymore.

LGTM=0intro
R=0intro, gobot, ality
CC=ality, golang-codereviews, jas, mischief
https://codereview.appspot.com/106460044
runtime: use the nsec system call instead of /dev/bintime on Plan 9

LGTM=0intro
R=0intro
CC=ality, dave, golang-codereviews, jas, mischief, rsc
https://codereview.appspot.com/104570043