]> Cypherpunks repositories - gostls13.git/commit
runtime: deflake TestProfBufWakeup
authorNick Ripley <nick.ripley@datadoghq.com>
Sat, 6 Dec 2025 15:09:38 +0000 (10:09 -0500)
committerNick Ripley <nick.ripley@datadoghq.com>
Mon, 8 Dec 2025 15:46:16 +0000 (07:46 -0800)
commit34397865b1174f4d4b33941877a5906e50965b3b
treea75fdfe8d1ac33d2d395f99d1c6c76369cbc5611
parentd4972f6295aede2ddc35bcb1da5f6351623e9e4d
runtime: deflake TestProfBufWakeup

If CI infrastructure is oversubscribed, the profile buffer reader can be
blocked long enough for the status in the traceback to be something like
"[syscall, 3 minutes]", rather than the "[syscall]" we are looking for.
Tweak the regexp to look for the expected state at the beginning of the
status in the brackets.

While we're here, clarify the possible "race" in the test, which has
more to do with failing to catch a buggy implementation rather than
failing for a correct implementation. Ideally if the implementation is
buggy, we should see the t.Errorf at least some of the time, even if we
don't see it in every run.

Change-Id: Iebd5229d338dc3f973349cea6dd84c506a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/727660
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/runtime/profbuf_test.go