diff --git a/misc/cgo/test/issue18146.go b/misc/cgo/test/issue18146.go index 3c600463f0..6483903fed 100644 --- a/misc/cgo/test/issue18146.go +++ b/misc/cgo/test/issue18146.go @@ -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.