time: skip TestLongAdjustTimers in short mode on single CPU systems

The OpenBSD armv7 port does not support SMP - on this platform the
TestLongAdjustTimers test passes in ~46 seconds on the openbsd/arm
builder when there is no other CPU contention, however it will almost
always fail when there is any other load.

Change-Id: Idf1c47b40376c749886843cdae11289c0984f714
Reviewed-on: https://go-review.googlesource.com/c/go/+/698556
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Commit-Queue: Cherry Mui <cherryyz@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Joel Sing 2025-08-23 15:05:51 +10:00 committed by Gopher Robot
parent ebc763f76d
commit a9689d2e0b

View file

@ -154,6 +154,10 @@ func TestLongAdjustTimers(t *testing.T) {
if runtime.GOOS == "android" || runtime.GOOS == "ios" || runtime.GOOS == "plan9" {
t.Skipf("skipping on %s - too slow", runtime.GOOS)
}
if testing.Short() && runtime.NumCPU() < 2 {
t.Skipf("skipping in short mode, insufficient CPUs")
}
t.Parallel()
var wg sync.WaitGroup
defer wg.Wait()