• Hana Kim's avatar
    runtime/pprof: allow tests to run multiple times · 9eb2c434
    Hana Kim authored
    TestMutexProfile and TestEmptyCallStack couldn't run multiple times
    because they mutate state in runtime (mutex profile counters and
    a user-defined profile type) and test whether the state
    matches what it is supposed to be after the very first run.
    
    We fix TestMutexProfile by relaxing the expected state condition.
    We fix TestEmptyCallStack by creating a new profile with a different
    name every time the test runs.
    
    For #25520
    
    Change-Id: I8e50cd9526eb650c8989457495ff90a24ce07863
    Reviewed-on: https://go-review.googlesource.com/114495
    Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    9eb2c434
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...