]> Cypherpunks repositories - gostls13.git/commit
internal/trace: only test for sync preemption if async preemption is off
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 7 Jul 2025 17:19:17 +0000 (17:19 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 7 Jul 2025 20:42:35 +0000 (13:42 -0700)
commit86b5ba731044dcbb0400f03293989796ed5807fe
tree6db091db2ac5c3c9fdf1b36535d5be19b589d861
parentef46e1b164e4a530c278434a9aaa2b23ce9a9d12
internal/trace: only test for sync preemption if async preemption is off

Currently, the test change made for the fix to #68090 is flaky. This is
because the sync-point-only goroutine that we expect to be sync
preempted might only ever get async preempted in some circumstances.

This change adds a variant to all trace tests to run with
asyncpreemptoff=1, and the stacks test, the flaky one, only actually
checks for the sync-point in the trace when async preemption is
disabled.

Fixes #74417.

Change-Id: Ib6341bbc26921574b8f0fff6dd521ce83f85499c
Reviewed-on: https://go-review.googlesource.com/c/go/+/686055
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/internal/trace/trace_test.go