diff options
Diffstat (limited to 'libgo/go/runtime/pprof/pprof_test.go')
-rw-r--r-- | libgo/go/runtime/pprof/pprof_test.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libgo/go/runtime/pprof/pprof_test.go b/libgo/go/runtime/pprof/pprof_test.go index 5f128c01cf1..2dc7aef7e96 100644 --- a/libgo/go/runtime/pprof/pprof_test.go +++ b/libgo/go/runtime/pprof/pprof_test.go @@ -7,6 +7,7 @@ package pprof_test import ( "bytes" "hash/crc32" + "os/exec" "runtime" . "runtime/pprof" "strings" @@ -17,8 +18,16 @@ import ( func TestCPUProfile(t *testing.T) { switch runtime.GOOS { case "darwin": - // see Apple Bug Report #9177434 (copied into change description) - return + out, err := exec.Command("uname", "-a").CombinedOutput() + if err != nil { + t.Fatal(err) + } + vers := string(out) + t.Logf("uname -a: %v", vers) + if strings.Contains(vers, "Darwin Kernel Version 10.8.0") && strings.Contains(vers, "root:xnu-1504.15.3~1/RELEASE_X86_64") { + t.Logf("skipping test on known-broken kernel (64-bit Snow Leopard)") + return + } case "plan9": // unimplemented return |