]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/test: skip Test18146 in short mode
authorIan Lance Taylor <iant@golang.org>
Wed, 27 Jun 2018 00:52:34 +0000 (17:52 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 27 Jun 2018 04:31:53 +0000 (04:31 +0000)
Fixes #21219

Change-Id: I1a2ec1afe06586ed33a3a855b77536490cac3a38
Reviewed-on: https://go-review.googlesource.com/121115
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/cgo/test/issue18146.go

index 3c600463f0335447f8a36c44fb20f607519f2b64..6483903feddf8dab152a9ac26bca79d18aabc425 100644 (file)
@@ -22,6 +22,10 @@ import (
 )
 
 func test18146(t *testing.T) {
+       if testing.Short() {
+               t.Skip("skipping in short mode")
+       }
+
        if runtime.GOOS == "darwin" {
                t.Skipf("skipping flaky test on %s; see golang.org/issue/18202", runtime.GOOS)
        }
@@ -33,10 +37,6 @@ func test18146(t *testing.T) {
        attempts := 1000
        threads := 4
 
-       if testing.Short() {
-               attempts = 100
-       }
-
        // Restrict the number of attempts based on RLIMIT_NPROC.
        // Tediously, RLIMIT_NPROC was left out of the syscall package,
        // probably because it is not in POSIX.1, so we define it here.