From: Russ Cox Date: Wed, 22 Jul 2015 17:22:42 +0000 (-0400) Subject: runtime/pprof: ignore too few samples on Windows test X-Git-Tag: go1.5beta3~111 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3b26e8b29a488d96ea921839ed22e70d894ebe38;p=gostls13.git runtime/pprof: ignore too few samples on Windows test Fixes #10842. Change-Id: I7de98f3073a47911863a252b7a74d8fdaa48c86f Reviewed-on: https://go-review.googlesource.com/12529 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go index e9fd1466ee..785d75a01e 100644 --- a/src/runtime/pprof/pprof_test.go +++ b/src/runtime/pprof/pprof_test.go @@ -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 }