@@ -6,6 +6,7 @@ package runtime_test
6
6
7
7
import (
8
8
"fmt"
9
+ "internal/race"
9
10
"math"
10
11
"math/rand"
11
12
. "runtime"
@@ -125,6 +126,9 @@ func TestSmhasherAppendedZeros(t *testing.T) {
125
126
126
127
// All 0-3 byte strings have distinct hashes.
127
128
func TestSmhasherSmallKeys (t * testing.T ) {
129
+ if race .Enabled {
130
+ t .Skip ("Too long for race mode" )
131
+ }
128
132
h := newHashSet ()
129
133
var b [3 ]byte
130
134
for i := 0 ; i < 256 ; i ++ {
@@ -166,6 +170,9 @@ func TestSmhasherTwoNonzero(t *testing.T) {
166
170
if testing .Short () {
167
171
t .Skip ("Skipping in short mode" )
168
172
}
173
+ if race .Enabled {
174
+ t .Skip ("Too long for race mode" )
175
+ }
169
176
h := newHashSet ()
170
177
for n := 2 ; n <= 16 ; n ++ {
171
178
twoNonZero (h , n )
@@ -208,6 +215,9 @@ func TestSmhasherCyclic(t *testing.T) {
208
215
if testing .Short () {
209
216
t .Skip ("Skipping in short mode" )
210
217
}
218
+ if race .Enabled {
219
+ t .Skip ("Too long for race mode" )
220
+ }
211
221
r := rand .New (rand .NewSource (1234 ))
212
222
const REPEAT = 8
213
223
const N = 1000000
@@ -275,6 +285,9 @@ func TestSmhasherPermutation(t *testing.T) {
275
285
if testing .Short () {
276
286
t .Skip ("Skipping in short mode" )
277
287
}
288
+ if race .Enabled {
289
+ t .Skip ("Too long for race mode" )
290
+ }
278
291
permutation (t , []uint32 {0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 }, 8 )
279
292
permutation (t , []uint32 {0 , 1 << 29 , 2 << 29 , 3 << 29 , 4 << 29 , 5 << 29 , 6 << 29 , 7 << 29 }, 8 )
280
293
permutation (t , []uint32 {0 , 1 }, 20 )
@@ -447,6 +460,9 @@ func TestSmhasherAvalanche(t *testing.T) {
447
460
if testing .Short () {
448
461
t .Skip ("Skipping in short mode" )
449
462
}
463
+ if race .Enabled {
464
+ t .Skip ("Too long for race mode" )
465
+ }
450
466
avalancheTest1 (t , & BytesKey {make ([]byte , 2 )})
451
467
avalancheTest1 (t , & BytesKey {make ([]byte , 4 )})
452
468
avalancheTest1 (t , & BytesKey {make ([]byte , 8 )})
@@ -514,6 +530,9 @@ func avalancheTest1(t *testing.T, k Key) {
514
530
515
531
// All bit rotations of a set of distinct keys
516
532
func TestSmhasherWindowed (t * testing.T ) {
533
+ if race .Enabled {
534
+ t .Skip ("Too long for race mode" )
535
+ }
517
536
t .Logf ("32 bit keys" )
518
537
windowed (t , & Int32Key {})
519
538
t .Logf ("64 bit keys" )
0 commit comments