aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2025-12-11 17:19:19 +0000
committerMichael Knyszek <mknyszek@google.com>2025-12-12 12:00:25 -0800
commit8f45611e78095c05075b4cc49e44aabde064e134 (patch)
tree651536190f5e27f64557b0902a7d3687d22e5fe0 /src/runtime/stack.go
parent34af879dde2cfc2688b486399e9fc7e60d1e96fc (diff)
downloadgo-8f45611e78095c05075b4cc49e44aabde064e134.tar.xz
runtime/pprof: deflake TestGoroutineLeakProfileConcurrency
Issue #76540 reports failures in this test from the leaked goroutine count being too small. The test makes an effort to wait for the goroutines to leak, but there's no guarantee. This change instead changes TestGoroutineLeakProfileConcurrency to wait for the number of leaked goroutines to reach at least the minimum expected before proceeding. This deflakes this particular issue. The downside of this change is that a failure to detect leaked goroutines due to a bug will lead to a timeout instead of an instant failure, but this change makes an effort to log and report that it was waiting for the goroutines to leak and timed out for that reason, so at least the failure is more obvious. Overall, this is still better than random flakes. While we're here, I also make some minor stylistic changes and document the helper functions a little more. I also noticed that checkFrames was using the wrong *testing.T, so this change fixes that too. Fixes #76540. Change-Id: I0508855dc39b91f8c6b72d059ce88dbfc68fe748 Reviewed-on: https://go-review.googlesource.com/c/go/+/729280 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/stack.go')
0 files changed, 0 insertions, 0 deletions