1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // Proc unit tests. In runtime package so can use runtime guts.
9 func RunStealOrderTest() {
11 for procs
:= 1; procs
<= 64; procs
++ {
12 ord
.reset(uint32(procs
))
13 if procs
>= 3 && len(ord
.coprimes
) < 2 {
14 panic("too few coprimes")
16 for co
:= 0; co
< len(ord
.coprimes
); co
++ {
17 enum
:= ord
.start(uint32(co
))
18 checked
:= make([]bool, procs
)
19 for p
:= 0; p
< procs
; p
++ {
22 println("procs:", procs
, "inc:", enum
.inc
)
23 panic("duplicate during enumeration")