aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2020-04-07 12:12:44 -0400
committerMichael Pratt <mpratt@google.com>2020-04-08 14:51:58 +0000
commit0dfb0513ec6a0e97db166bd91a2dc0a1ceb154f7 (patch)
tree46eef9a3ef3767e4b7d1c54b18beb7415b5daede /src/sync
parent08dd4ad7e30313d089793f19baff1855bbaa004e (diff)
downloadgo-0dfb0513ec6a0e97db166bd91a2dc0a1ceb154f7.tar.xz
runtime/pprof: try to use real stack in TestTryAdd
TestTryAdd is particularly brittle because it tests some real cases by constructing fake sample stack frames. If those frames don't correctly represent what the runtime would generate then they may fail to catch regressions. Instead, call runtime.Callers at the bottom of real function calls to generate real frames as a base for truncation, etc in tests. Several of these tests still have to fake parts of the frames to test the right thing, but this is a bit less fragile. Change-Id: I62522a9ded5544b06d1bf28550af5400f3af667b Reviewed-on: https://go-review.googlesource.com/c/go/+/227484 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Diffstat (limited to 'src/sync')
0 files changed, 0 insertions, 0 deletions