Skip to content

Commit 59ca878

Browse files
committed
runtime/pprof: skip TestStackBarrierProfiling
This test triggers a large number of usleep(100)s. linux/arm, openbsd, and solaris have very poor timer resolution on the builders, so usleep(100) actually gives up the whole scheduling quantum. On Linux and OpenBSD (and probably Solaris), profiling signals are only generated when a process completes a whole scheduling quantum, so this test often gets zero profiling signals and fails. Until we figure out what to do about this, skip this test on these platforms. Updates #13405. Change-Id: Ica94e4a8ae7a8df3e5a840504f83ee2ec08727df Reviewed-on: https://go-review.googlesource.com/18252 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Austin Clements <austin@google.com>
1 parent 2c67c8c commit 59ca878

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/runtime/pprof/pprof_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,19 @@ func TestMathBigDivide(t *testing.T) {
333333
}
334334

335335
func TestStackBarrierProfiling(t *testing.T) {
336+
if (runtime.GOOS == "linux" && runtime.GOARCH == "arm") || runtime.GOOS == "openbsd" || runtime.GOOS == "solaris" {
337+
// This test currently triggers a large number of
338+
// usleep(100)s. These kernels/arches have poor
339+
// resolution timers, so this gives up a whole
340+
// scheduling quantum. On Linux and OpenBSD (and
341+
// probably Solaris), profiling signals are only
342+
// generated when a process completes a whole
343+
// scheduling quantum, so this test often gets zero
344+
// profiling signals and fails.
345+
t.Skipf("low resolution timers inhibit profiling signals (golang.org/issue/13405)")
346+
return
347+
}
348+
336349
if !strings.Contains(os.Getenv("GODEBUG"), "gcstackbarrierall=1") {
337350
// Re-execute this test with constant GC and stack
338351
// barriers at every frame.

0 commit comments

Comments
 (0)