From: Dmitriy Vyukov Date: Tue, 6 Nov 2012 08:09:40 +0000 (+0400) Subject: runtime: disable parallel for tests under race detector. X-Git-Tag: go1.1rc2~1961 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d6b9a03b7f6f158c470405e2e4d6a68dcd094a95;p=gostls13.git runtime: disable parallel for tests under race detector. The race detector does not understand ParFor synchronization, because it's implemented in C. If run with -cpu=2 currently race detector says: WARNING: DATA RACE Read by goroutine 5: runtime_test.TestParForParallel() src/pkg/runtime/parfor_test.go:118 +0x2e0 testing.tRunner() src/pkg/testing/testing.go:301 +0x8f Previous write by goroutine 6: runtime_test.funcĀ·024() src/pkg/runtime/parfor_test.go:111 +0x52 R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6811082 --- diff --git a/src/pkg/runtime/parfor_test.go b/src/pkg/runtime/parfor_test.go index 0547db0209..7644354ab3 100644 --- a/src/pkg/runtime/parfor_test.go +++ b/src/pkg/runtime/parfor_test.go @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// The race detector does not understand ParFor synchronization. +// +build !race + package runtime_test import (