]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: ignore too few samples on Windows test
authorRuss Cox <rsc@golang.org>
Wed, 22 Jul 2015 17:22:42 +0000 (13:22 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 22 Jul 2015 20:26:37 +0000 (20:26 +0000)
Fixes #10842.

Change-Id: I7de98f3073a47911863a252b7a74d8fdaa48c86f
Reviewed-on: https://go-review.googlesource.com/12529
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/pprof/pprof_test.go

index e9fd1466ee5755089948ae900d22cdffe1ff8d44..785d75a01e905cba5036560c00bd1544ce8c867c 100644 (file)
@@ -164,6 +164,13 @@ func testCPUProfile(t *testing.T, need []string, f func()) {
        })
        t.Logf("total %d CPU profile samples collected", samples)
 
+       if samples < 10 && runtime.GOOS == "windows" {
+               // On some windows machines we end up with
+               // not enough samples due to coarse timer
+               // resolution. Let it go.
+               t.Skip("too few samples on Windows (golang.org/issue/10842)")
+       }
+
        if len(need) == 0 {
                return
        }