• Austin Clements's avatar
    runtime/pprof: deflake TestGoroutineCounts · d659682d
    Austin Clements authored
    TestGoroutineCounts currently depends on timing to get 100 goroutines
    to a known blocking point before taking a profile. This fails
    frequently, with different goroutines captured at different stacks.
    The test is disabled on openbsd because it was too flaky, but in fact
    it flakes on all platforms.
    
    Fix this by using Gosched instead of timing. This is both much more
    reliable and makes the test run faster.
    
    Fixes #15156.
    
    Change-Id: Ia6e894196d717655b8fb4ee96df53f6cc8bc5f1f
    Reviewed-on: https://go-review.googlesource.com/42953
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    d659682d
Name
Last commit
Last update
..
internal/profile Loading commit data...
testdata Loading commit data...
elf.go Loading commit data...
label.go Loading commit data...
label_test.go Loading commit data...
map.go Loading commit data...
mprof_test.go Loading commit data...
pprof.go Loading commit data...
pprof_test.go Loading commit data...
proto.go Loading commit data...
proto_test.go Loading commit data...
protobuf.go Loading commit data...
protomem.go Loading commit data...
protomem_test.go Loading commit data...
runtime.go Loading commit data...
runtime_test.go Loading commit data...