aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/crash_cgo_test.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-11-04 05:28:01 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-11-04 16:56:57 +0000
commit23416315060bf7601e5779c3a6a2529d4d604584 (patch)
treecbfc11128e579a983691f5b96c224516450bf874 /src/runtime/crash_cgo_test.go
parent3f69909851813006216f49083932badee396c4f1 (diff)
downloadgo-23416315060bf7601e5779c3a6a2529d4d604584.tar.gz
go-23416315060bf7601e5779c3a6a2529d4d604584.zip
all: sprinkle t.Parallel on some slow tests
I used the slowtests.go tool as described in https://golang.org/cl/32684 on packages that stood out. go test -short std drops from ~56 to ~52 seconds. This isn't a huge win, but it was mostly an exercise. Updates #17751 Change-Id: I9f3402e36a038d71e662d06ce2c1d52f6c4b674d Reviewed-on: https://go-review.googlesource.com/32751 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/crash_cgo_test.go')
-rw-r--r--src/runtime/crash_cgo_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go
index 34d1f0594a..7014f119ad 100644
--- a/src/runtime/crash_cgo_test.go
+++ b/src/runtime/crash_cgo_test.go
@@ -19,10 +19,12 @@ import (
)
func TestCgoCrashHandler(t *testing.T) {
+ t.Parallel()
testCrashHandler(t, true)
}
func TestCgoSignalDeadlock(t *testing.T) {
+ t.Parallel()
if testing.Short() && runtime.GOOS == "windows" {
t.Skip("Skipping in short mode") // takes up to 64 seconds
}
@@ -34,6 +36,7 @@ func TestCgoSignalDeadlock(t *testing.T) {
}
func TestCgoTraceback(t *testing.T) {
+ t.Parallel()
got := runTestProg(t, "testprogcgo", "CgoTraceback")
want := "OK\n"
if got != want {
@@ -42,6 +45,7 @@ func TestCgoTraceback(t *testing.T) {
}
func TestCgoCallbackGC(t *testing.T) {
+ t.Parallel()
switch runtime.GOOS {
case "plan9", "windows":
t.Skipf("no pthreads on %s", runtime.GOOS)
@@ -66,6 +70,7 @@ func TestCgoCallbackGC(t *testing.T) {
}
func TestCgoExternalThreadPanic(t *testing.T) {
+ t.Parallel()
if runtime.GOOS == "plan9" {
t.Skipf("no pthreads on %s", runtime.GOOS)
}
@@ -77,6 +82,7 @@ func TestCgoExternalThreadPanic(t *testing.T) {
}
func TestCgoExternalThreadSIGPROF(t *testing.T) {
+ t.Parallel()
// issue 9456.
switch runtime.GOOS {
case "plan9", "windows":
@@ -117,6 +123,7 @@ func TestCgoExternalThreadSIGPROF(t *testing.T) {
}
func TestCgoExternalThreadSignal(t *testing.T) {
+ t.Parallel()
// issue 10139
switch runtime.GOOS {
case "plan9", "windows":
@@ -152,6 +159,7 @@ func TestCgoDLLImports(t *testing.T) {
}
func TestCgoExecSignalMask(t *testing.T) {
+ t.Parallel()
// Test issue 13164.
switch runtime.GOOS {
case "windows", "plan9":
@@ -165,6 +173,7 @@ func TestCgoExecSignalMask(t *testing.T) {
}
func TestEnsureDropM(t *testing.T) {
+ t.Parallel()
// Test for issue 13881.
switch runtime.GOOS {
case "windows", "plan9":
@@ -181,6 +190,7 @@ func TestEnsureDropM(t *testing.T) {
// Test that the program that doesn't need any cgo pointer checking
// takes about the same amount of time with it as without it.
func TestCgoCheckBytes(t *testing.T) {
+ t.Parallel()
// Make sure we don't count the build time as part of the run time.
testenv.MustHaveGoBuild(t)
exe, err := buildTestProg(t, "testprogcgo")
@@ -220,6 +230,7 @@ func TestCgoCheckBytes(t *testing.T) {
}
func TestCgoPanicDeadlock(t *testing.T) {
+ t.Parallel()
// test issue 14432
got := runTestProg(t, "testprogcgo", "CgoPanicDeadlock")
want := "panic: cgo error\n\n"
@@ -229,6 +240,7 @@ func TestCgoPanicDeadlock(t *testing.T) {
}
func TestCgoCCodeSIGPROF(t *testing.T) {
+ t.Parallel()
got := runTestProg(t, "testprogcgo", "CgoCCodeSIGPROF")
want := "OK\n"
if got != want {
@@ -237,6 +249,7 @@ func TestCgoCCodeSIGPROF(t *testing.T) {
}
func TestCgoCrashTraceback(t *testing.T) {
+ t.Parallel()
if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH)
}
@@ -249,6 +262,7 @@ func TestCgoCrashTraceback(t *testing.T) {
}
func TestCgoTracebackContext(t *testing.T) {
+ t.Parallel()
got := runTestProg(t, "testprogcgo", "TracebackContext")
want := "OK\n"
if got != want {
@@ -257,6 +271,7 @@ func TestCgoTracebackContext(t *testing.T) {
}
func testCgoPprof(t *testing.T, buildArg, runArg string) {
+ t.Parallel()
if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH)
}
@@ -344,6 +359,7 @@ func TestRaceProf(t *testing.T) {
}
func TestRaceSignal(t *testing.T) {
+ t.Parallel()
if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH)
}