1
0
mirror of https://github.com/golang/go synced 2024-11-19 23:14:47 -07:00
go/src/runtime/race
Dmitry Vyukov 572f7660a7 runtime/race: run tests with GOMAXPROCS=1
We set GOMAXPROCS=1 to prevent test flakiness.
There are two sources of flakiness:
1. Some tests rely on particular execution order.
   If the order is different, race does not happen at all.
2. Ironically, ThreadSanitizer runtime contains a logical race condition
   that can lead to false negatives if racy accesses happen literally at the same time.
Tests used to work reliably in the good old days of GOMAXPROCS=1.
So let's set it for now. A more reliable solution is to explicitly annotate tests
with required execution order by means of a special "invisible" synchronization primitive
(that's what is done for C++ ThreadSanitizer tests). This is issue #14119.

This reduces flakes on RaceAsFunc3 test from 60/3000 to 1/3000.

Fixes #14086
Fixes #14079
Fixes #14035

Change-Id: Ibaec6b2b21e27b62563bffbb28473a854722cf41
Reviewed-on: https://go-review.googlesource.com/18968
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-01-27 20:49:36 +00:00
..
testdata runtime/race: fix test so it compiles 2016-01-20 03:08:07 +00:00
doc.go
output_test.go runtime/race: run tests with GOMAXPROCS=1 2016-01-27 20:49:36 +00:00
race_darwin_amd64.syso runtime/race: update race runtime 2015-11-12 21:28:36 +00:00
race_freebsd_amd64.syso runtime/race: update race runtime 2015-11-12 21:28:36 +00:00
race_linux_amd64.syso runtime/race: update race runtime 2015-11-12 21:28:36 +00:00
race_test.go runtime/race: run tests with GOMAXPROCS=1 2016-01-27 20:49:36 +00:00
race_unix_test.go
race_windows_amd64.syso runtime/race: update race runtime 2015-11-12 21:28:36 +00:00
race.go runtime/race: update two stale references 2015-12-09 18:11:42 +00:00
README runtime/race: update race runtime 2015-11-12 21:28:36 +00:00
sched_test.go

runtime/race package contains the data race detector runtime library.
It is based on ThreadSanitizer race detector, that is currently a part of
the LLVM project (http://llvm.org/git/compiler-rt.git).

To update the .syso files use golang.org/x/build/cmd/racebuild.

Current runtime is built on rev 389d49d4943780efbfcd2a434f4462b6d0f23c44.