aboutsummaryrefslogtreecommitdiff
path: root/src/run.bash
AgeCommit message (Collapse)Author
2014-02-15build: disable race detector test in run.bat on windowsRuss Cox
CL 64170043 disabled it in run.bash for Unix systems. I did not realize Windows systems also ran the race detector test. TBR=iant CC=golang-codereviews https://golang.org/cl/64480043
2014-02-15cmd/gc: correct liveness for fat variablesRuss Cox
The VARDEF placement must be before the initialization but after any final use. If you have something like s = ... using s ... the rhs must be evaluated, then the VARDEF, then the lhs assigned. There is a large comment in pgen.c on gvardef explaining this in more detail. This CL also includes Ian's suggestions from earlier CLs, namely commenting the use of mode in link.h and fixing the precedence of the ~r check in dcl.c. This CL enables the check that if liveness analysis decides a variable is live on entry to the function, that variable must be a function parameter (not a result, and not a local variable). If this check fails, it indicates a bug in the liveness analysis or in the generated code being analyzed. The race detector generates invalid code for append(x, y...). The code declares a temporary t and then uses cap(t) before initializing t. The new liveness check catches this bug and stops the compiler from writing out the buggy code. Consequently, this CL disables the race detector tests in run.bash until the race detector bug can be fixed (golang.org/issue/7334). Except for the race detector bug, the liveness analysis check does not detect any problems (this CL and the previous CLs fixed all the detected problems). The net test still fails with GOGC=0 but the rest of the tests now pass or time out (because GOGC=0 is so slow). TBR=iant CC=golang-codereviews https://golang.org/cl/64170043
2013-09-04cgo: enable cgo on dragonflyAulus Egnatius Varialus
Enable cgo for dragonfly/386 and dragonfly/amd64. R=golang-dev, jsing, iant, bradfitz CC=golang-dev https://golang.org/cl/13247046
2013-09-03cmd/cgo: don't let #cgo directives mess up line numberingIan Lance Taylor
Fixes #5272. R=golang-dev, r CC=golang-dev https://golang.org/cl/13498046
2013-08-14runtime.cmd/ld: Add ARM external linking and implement -shared in terms of ↵Elias Naur
external linking This CL is an aggregate of 10271047, 10499043, 9733044. Descriptions of each follow: 10499043 runtime,cmd/ld: Merge TLS symbols and teach 5l about ARM TLS This CL prepares for external linking support to ARM. The pseudo-symbols runtime.g and runtime.m are merged into a single runtime.tlsgm symbol. When external linking, the offset of a thread local variable is stored at a memory location instead of being embedded into a offset of a ldr instruction. With a single runtime.tlsgm symbol for both g and m, only one such offset is needed. The larger part of this CL moves TLS code from gcc compiled to internally compiled. The TLS code now uses the modern MRC instruction, and 5l is taught about TLS fallbacks in case the instruction is not available or appropriate. 10271047 This CL adds support for -linkmode external to 5l. For 5l itself, use addrel to allow for D_CALL relocations to be handled by the host linker. Of the cases listed in rsc's comment in issue 4069, only case 5 and 63 needed an update. One of the TODO: addrel cases was since replaced, and the rest of the cases are either covered by indirection through addpool (cases with LTO or LFROM flags) or stubs (case 74). The addpool cases are covered because addpool emits AWORD instructions, which in turn are handled by case 11. In the runtime, change the argv argument in the rt0* functions slightly to be a pointer to the argv list, instead of relying on a particular location of argv. 9733044 The -shared flag to 6l outputs a shared library, implemented in Go and callable from non-Go programs such as C. The main part of this CL change the thread local storage model. Go uses the fastest and least general mode, local exec. TLS data in shared libraries normally requires at least the local dynamic mode, however, this CL instead opts for using the initial exec mode. Initial exec mode is faster than local dynamic mode and can be used in linux since the linker has reserved a limited amount of TLS space for performance sensitive TLS code. Initial exec mode requires an extra load from the GOT table to determine the TLS offset. This penalty will not be paid if ld is not in -shared mode, since TLS accesses will be reduced to local exec. The elf sections .init_array and .rela.init_array are added to register the Go runtime entry with cgo at library load time. The "hidden" attribute is added to Cgo functions called from Go, since Go does not generate call through the GOT table, and adding non-GOT relocations for a global function is not supported by gcc. Cgo symbols don't need to be global and avoiding the GOT table is also faster. The changes to 8l are only removes code relevant to the old -shared mode where internal linking was used. This CL only address the low level linker work. It can be submitted by itself, but to be useful, the runtime changes in CL 9738047 is also needed. Design discussion at https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/zmjXkGrEx6Q Fixes #5590. R=rsc CC=golang-dev https://golang.org/cl/12871044
2013-08-12runtime/race: add end-to-end testDmitriy Vyukov
Fixes #5933. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12699051
2013-08-09cmd/api: eliminate duplicate package import workRuss Cox
On my Mac, cuts the API checks from 15 seconds to 6 seconds. Also clean up some tag confusion: go run list-of-files ignores tags. R=bradfitz, gri CC=golang-dev https://golang.org/cl/12699048
2013-08-07build: change how cmd/api is run in run.bash and run.batBrad Fitzpatrick
In prep for Robert's forthcoming cmd/api rewrite which depends on the go.tools subrepo, we'll need to be more careful about how and when we run cmd/api. Rather than implement this policy in both run.bash and run.bat, this change moves the policy and mechanism into cmd/api/run.go, which will then evolve. The plan is in a TODO in run.go. R=golang-dev, gri CC=golang-dev https://golang.org/cl/12482044
2013-08-02build: ignore new zfiles, delete temp goplay binary in run.bashBrad Fitzpatrick
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12320045
2013-08-02build: on OS X 10.8 and later, use clang instead of gccRuss Cox
Fixes #5822. Will no doubt cause other problems, but Apple has forced our hand. R=golang-dev, bradfitz, khr CC=golang-dev https://golang.org/cl/12350044
2013-08-02misc/dist: don't ship cmd/apiBrad Fitzpatrick
cmd/api is a tool to prevent the Go developers from breaking the Go 1 API promise. It has no utility to end users and doesn't run on arbitrary packages (it's always been full of hacks for its bespoke type checker to work on the standard library) Robert's in-progress rewrite depends on the go.tools repo for go/types, so we won't be able to ship this tool later anyway. Just remove it from binary distributions. A future change to run.bash can conditionally build & run cmd/api, perhaps automatically fetching go/types if necessary. I assume people don't want to vendor go/types into a private gopath just for cmd/api. I will need help with run.bat. R=golang-dev, adg, dsymonds, rsc CC=golang-dev https://golang.org/cl/12316043
2013-08-01build: remove builder from test suite (fix build)Andrew Gerrand
R=golang-dev, dave, dsymonds CC=golang-dev https://golang.org/cl/12225043
2013-07-30doc/codewalk: test source codeAndrew Gerrand
Fixes #2648. R=golang-dev, r CC=golang-dev https://golang.org/cl/11331043
2013-07-29build: fix buildRuss Cox
As promised. TBR=dvyukov CC=golang-dev https://golang.org/cl/12063043
2013-07-29build: break buildsRuss Cox
I want to see the timing information in build logs, and we can't see the logs for "ok" builds. So make the build fail everywhere. Will roll back immediately. TBR=dvyukov CC=golang-dev https://golang.org/cl/12058046
2013-07-24cmd/cgo: Fix issue with cgo cdefsKevin Klues
The problem is that the cdecl() function in cmd/cgo/godefs.go isn't properly translating the Go array type to a C array type when an asterisk follows the [] in the array type declaration (it is perfectly legal to put the asterisk on either side of the [] in go syntax, depending on how you set up your pointers). That said, the cdefs tool is only designed to translate from Go types generated using the cgo *godefs* tool -- where the godefs tool is designed to translate gcc-style C types into Go types. In essence, the cdefs tool translates from gcc-style C types to Go types (via the godefs tool), then back to kenc-style C types. Because of this, cdefs does not need to know how to translate arbitraty Go types into C, just the ones produced by godefs. The problem is that during this translation process, the logic is slightly wrong when going from (e.g.): char *array[10]; to: array [10]*int8; back to: int8 *array[10]; In the current implementation of cdecl(), the translation from the Go type declaration back to the kenc-style declaration looks for Go types of the form: name *[]type; rather than the actual generated Go type declaration of: name []*type; Both are valid Go syntax, with slightly different semantics, but the latter is the only one that can ever be generated by the godefs tools. (The semantics of the former are not directly expressible in a single C statement -- you would have to have to first typedef the array type, then declare a pointer to that typedef'd type in a separate statement). This commit changes the logic of cdecl() to look properly for, and translate, Go type declarations of the form: name []*type; Additionally, the original implementation only allowed for a single asterisk and a single sized aray (i.e. only a single level of pointer indirection, and only one set of []) on the type, whereas the patched version allows for an arbitrary number of both. Tests are included in misc/cgo/testcdefs and the all.bash script has been updated to account for these. R=golang-dev, bradfitz, dave, iant CC=golang-dev https://golang.org/cl/11377043
2013-07-13run.bash: enlarge timeout of runtime testsShenghou Ma
Recently addition to runtime test makes it take very close to 720s of timeout limit on the netbsd-arm-qemu builder. R=golang-dev, go.peter.90, rsc CC=golang-dev https://golang.org/cl/10935043
2013-07-11run.bash: actually stop on cgo failuresRuss Cox
I hate bash. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/11200043
2013-06-17run.bash: raise ulimit for the number of threads.Benny Siegert
This is needed on NetBSD-current. Support for ulimit -T in bash was added in 4.2nb3. R=golang-dev, minux.ma, rsc, dave CC=golang-dev https://golang.org/cl/10078047
2013-06-12runtime: more flexible heap memory mapping on 64-bitsDmitriy Vyukov
Fixes #5641. R=golang-dev, dave, daniel.morsing, iant CC=golang-dev, kcc https://golang.org/cl/10126044
2013-05-22cmd/go: fix LDFLAGS handling, enable misc/cgo/testso on DarwinShenghou Ma
Fixes #5479. R=golang-dev, dave CC=golang-dev https://golang.org/cl/9416047
2013-05-06api: add go1.1.txt; update cmd/api to use itBrad Fitzpatrick
R=golang-dev, adg, r CC=golang-dev https://golang.org/cl/9250043
2013-03-29cmd/dist, cmd/ld: GO_EXTLINK_ENABLED=0 defaults to -linkmode=internalIan Lance Taylor
Change build system to set GO_EXTLINK_ENABLED=0 by default for OS X 10.6, since the system linker has a bug and can not handle the object files generated by 6l. Fixes #5130. R=golang-dev, r CC=golang-dev https://golang.org/cl/8183043
2013-03-27cmd/ld: emit TLS relocations during external linkingIan Lance Taylor
This CL was written by rsc. I just tweaked 8l. This CL adds TLS relocation to the ELF .o file we write during external linking, so that the host linker (gcc) can decide the final location of m and g. Similar relocations are not necessary on OS X because we use an alternate program start-time mechanism to acquire thread-local storage. Similar relocations are not necessary on ARM or Plan 9 or Windows because external linking mode is not yet supported on those systems. On almost all ELF systems, the references we use are like %fs:-0x4 or %gs:-0x4, which we write in 6a/8a as -0x4(FS) or -0x4(GS). On Linux/ELF, however, Xen's lack of support for this mode forced us long ago to use a two-instruction sequence: first we load %gs:0x0 into a register r, and then we use -0x4(r). (The ELF program loader arranges that %gs:0x0 contains a regular pointer to that same memory location.) In order to relocate those -0x4(r) references, the linker must know where they are. This CL adds the equivalent notation -0x4(r)(GS*1) for this purpose: it assembles to the same encoding as -0x4(r) but the (GS*1) indicates to the linker that this is one of those thread-local references that needs relocation. Thanks to Elias Naur for reminding me about this missing piece and also for writing the test. R=r CC=golang-dev https://golang.org/cl/7891047
2013-03-25build, cmd/5l: actually report failures for -linkmode testsShenghou Ma
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7938046
2013-03-24build: increase timeout for ARMShenghou Ma
in an effort to make builder freebsd-arm-pi and netbsd-arm-qemu pass again. R=golang-dev, r CC=golang-dev https://golang.org/cl/7621050
2013-03-19cmd/ld: replace -hostobj with -linkmodeRuss Cox
Still disabled. Need to fix TLS. R=golang-dev, minux.ma, bradfitz CC=golang-dev https://golang.org/cl/7783044
2013-03-15build: skip benchmarks on OpenBSDRuss Cox
They are making the build die. I want to be able to see that everything else is okay. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7546049
2013-03-11cmd/ld, runtime/cgo: allow a symbol to be both cgo_export and cgo_import.Shenghou Ma
Fixes #4878. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7420052
2013-03-11build: enable host linking test for all BSDsRuss Cox
Let's just see what breaks. R=golang-dev, bradfitz, adg CC=golang-dev https://golang.org/cl/7693043
2013-03-11cmd/ld: darwin support for host linkingRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/7626045
2013-03-01runtime/cgo: fix arm build, re-enable testRuss Cox
Fixes #4961. R=golang-dev, r, minux.ma CC=golang-dev https://golang.org/cl/7443048
2013-03-01build: skip cgo test on armRuss Cox
Update #4961. R=golang-dev CC=golang-dev https://golang.org/cl/7451044
2013-03-01build: disable cgo test on openbsdRuss Cox
Update #4878. R=golang-dev CC=golang-dev https://golang.org/cl/7450048
2013-02-23cmd/cgo, cmd/dist, cmd/go: cgo with clang fixesShenghou Ma
1. Workaround the smart clang diagnostics with -Qunused-arguments: clang: error: argument unused during compilation: '-XXX' 2. if "clang -print-libgcc-file-name" returns non-absolute path, don't provide that on linker command line. 3. Fix dwarf.PtrType.Size() in cmd/cgo as clang doesn't generate DW_AT_byte_size for pointer types. 4. Workaround warnings for -Wno-unneeded-internal-declaration with -Wno-unknown-warning-option. 5. Add -Wno-unused-function. 6. enable race detector test on darwin with clang (at least Apple clang version 1.7 (tags/Apple/clang-77) works). Requires CL 7354043. Update #4829 This should fix most parts of the problem, but one glitch still remains. DWARF generated by newer clang doesn't differentiate these two function types: void *malloc(size_t); void *malloc(unsigned long int); so you might need to do this to make make.bash pass: sed -i -e 's/C.malloc(C.size_t/C.malloc(C.ulong/' pkg/os/user/lookup_unix.go R=golang-dev, dave, iant, rsc CC=golang-dev https://golang.org/cl/7351044
2013-02-15build: clang supportRuss Cox
This works with at least one version of clang that existed at one moment in time. No guarantees about clangs past or future. To try: CC=clang all.bash It does not work with the Xcode clang, because that clang fails at printing a useful answer to: clang -print-libgcc-file-name The clang that works prints a full path name for that command, not just "libgcc.a". Fixes #4713. R=iant, minux.ma CC=golang-dev https://golang.org/cl/7323068
2012-11-15run.bash: fix linux/arm buildDave Cheney
Revert to the shell builtin to avoid hosts that do not have /usr/bin/time. R=golang-dev, iant CC=golang-dev https://golang.org/cl/6848054
2012-11-15run.{bash,bat,rc}: unset GOMAXPROCS before ../testDave Cheney
test/run.go already executes tests in parallel where possible. An unknown GOMAXPROCS value during the tests is known to cause failures with tests that measure allocations. ref: https://groups.google.com/d/topic/golang-nuts/tgMhFJ3F5WY/discussion R=fullung, minux.ma, r CC=golang-dev https://golang.org/cl/6847050
2012-11-01build: do not run race tests with cgo disabledRuss Cox
R=dvyukov CC=golang-dev https://golang.org/cl/6810067
2012-11-01run.bash: add sanity test for race detectorDmitriy Vyukov
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6612064
2012-10-04cmd/api: add exception fileRob Pike
Fixes build. R=golang-dev, adg, bradfitz, dsymonds, dave CC=golang-dev https://golang.org/cl/6586074
2012-09-17run.bash: fix a typo (fix build)Shenghou Ma
R=golang-dev CC=golang-dev https://golang.org/cl/6506121
2012-09-17run.bash: set appropriate ulimitsShenghou Ma
mainly for NetBSD/OpenBSD. R=bradfitz, r, rsc CC=golang-dev https://golang.org/cl/6453154
2012-08-07misc/cgo/{life,stdio}, test/run.go: use test/run.go to do the cgo testsShenghou Ma
Enhances test/run.go to support testing other directories Will enable stdio tests on Windows in a follow-up CL. R=golang-dev, alex.brainman, rsc CC=golang-dev https://golang.org/cl/6220049
2012-07-14build: revert 61d1d72136f7 (add few tests with GOMAXPROCS=32)Dmitriy Vyukov
Some tests currently fail with GOMAXPROCS>1 R=golang-dev CC=golang-dev https://golang.org/cl/6398044
2012-07-14build: add few tests with GOMAXPROCS=32 to run.bashDmitriy Vyukov
Some class of bugs (data races, runtime bugs) can be found only with real parallelism. Note that GOMAXPROCS=32 is somewhat different from go test -cpu=32, this intentionally uses GOMAXPROCS to stress program bootstrap, testing code, garbage collections, etc. Package selection is mostly random. R=golang-dev, dave, r CC=golang-dev https://golang.org/cl/6346070
2012-05-22cmd/api: add api/next.txtBrad Fitzpatrick
This quiets all.bash noise for upcoming features we know about. The all.bash warnings will now only print for things not in next.txt (or in next.txt but not in the API). Once an API is frozen, we rename next.txt to a new frozen file (like go1.txt) Fixes #3651 R=golang-dev, r CC=golang-dev https://golang.org/cl/6218069
2012-04-04build: unset GOROOT_FINAL before testsShenghou Ma
Fix the builders. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5976068
2012-03-26run.bash: set -e in new codewalk blockRob Pike
Otherwise we won't fail if something goes wrong. This shell programming stuff is tricky. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5905062
2012-03-26run.bash: compile the codewalksRob Pike
They could be tested but that requires more than seems wise right now. Update #2648. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5908054