]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: skip TestStackBarrierProfiling
authorAustin Clements <austin@google.com>
Tue, 5 Jan 2016 16:33:25 +0000 (11:33 -0500)
committerAustin Clements <austin@google.com>
Tue, 5 Jan 2016 18:48:19 +0000 (18:48 +0000)
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>

src/runtime/pprof/pprof_test.go

index b87e47eb2f8e575d273e012586f5d0f597cbe73b..d207464ad1a35c719055717e98ed4feec3a5ea94 100644 (file)
@@ -333,6 +333,19 @@ func TestMathBigDivide(t *testing.T) {
 }
 
 func TestStackBarrierProfiling(t *testing.T) {
+       if (runtime.GOOS == "linux" && runtime.GOARCH == "arm") || runtime.GOOS == "openbsd" || runtime.GOOS == "solaris" {
+               // This test currently triggers a large number of
+               // usleep(100)s. These kernels/arches have poor
+               // resolution timers, so this gives up a 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.
+               t.Skipf("low resolution timers inhibit profiling signals (golang.org/issue/13405)")
+               return
+       }
+
        if !strings.Contains(os.Getenv("GODEBUG"), "gcstackbarrierall=1") {
                // Re-execute this test with constant GC and stack
                // barriers at every frame.